drivers/staging/media/atomisp//pci/ia_css_firmware.h:52:29: warning: declaration of 'struct device' will not be visible outside of this function

From: kernel test robot
Date: Tue Oct 20 2020 - 04:27:30 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 270315b8235e3d10c2e360cff56c2f9e0915a252
commit: 0cd39f4600ed4de859383018eb10f0f724900e1b locking/seqlock, headers: Untangle the spaghetti monster
date: 3 months ago
config: x86_64-randconfig-a003-20201020 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ea693a162786d933863ab079648d4261ac0ead47)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0cd39f4600ed4de859383018eb10f0f724900e1b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0cd39f4600ed4de859383018eb10f0f724900e1b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from drivers/staging/media/atomisp/pci/mmu/sh_mmu_mrfld.c:23:
In file included from drivers/staging/media/atomisp//pci/atomisp_compat.h:22:
In file included from drivers/staging/media/atomisp//pci/atomisp_compat_css20.h:24:
In file included from drivers/staging/media/atomisp//pci/ia_css.h:28:
In file included from drivers/staging/media/atomisp//pci/ia_css_control.h:25:
>> drivers/staging/media/atomisp//pci/ia_css_firmware.h:52:29: warning: declaration of 'struct device' will not be visible outside of this function [-Wvisibility]
ia_css_load_firmware(struct device *dev, const struct ia_css_env *env,
^
In file included from drivers/staging/media/atomisp/pci/mmu/sh_mmu_mrfld.c:23:
In file included from drivers/staging/media/atomisp//pci/atomisp_compat.h:22:
In file included from drivers/staging/media/atomisp//pci/atomisp_compat_css20.h:24:
In file included from drivers/staging/media/atomisp//pci/ia_css.h:28:
>> drivers/staging/media/atomisp//pci/ia_css_control.h:49:24: warning: declaration of 'struct device' will not be visible outside of this function [-Wvisibility]
int ia_css_init(struct device *dev,
^
2 warnings generated.

vim +52 drivers/staging/media/atomisp//pci/ia_css_firmware.h

ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 32
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 33 /* @brief Loads the firmware
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 34 * @param[in] env Environment, provides functions to access the
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 35 * environment in which the CSS code runs. This is
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 36 * used for host side memory access and message
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 37 * printing.
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 38 * @param[in] fw Firmware package containing the firmware for all
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 39 * predefined ISP binaries.
41022d35ddf2193 drivers/staging/media/atomisp/pci/ia_css_firmware.h Mauro Carvalho Chehab 2020-05-28 40 * @return Returns -EINVAL in case of any
41022d35ddf2193 drivers/staging/media/atomisp/pci/ia_css_firmware.h Mauro Carvalho Chehab 2020-05-28 41 * errors and 0 otherwise.
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 42 *
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 43 * This function interprets the firmware package. All
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 44 * contents of this firmware package are copied into local data structures, so
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 45 * the fw pointer could be freed after this function completes.
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 46 *
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 47 * Rationale for this function is that it can be called before ia_css_init, and thus
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 48 * speeds up ia_css_init (ia_css_init is called each time a stream is created but the
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 49 * firmware only needs to be loaded once).
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 50 */
41022d35ddf2193 drivers/staging/media/atomisp/pci/ia_css_firmware.h Mauro Carvalho Chehab 2020-05-28 51 int
8568fe630066a73 drivers/staging/media/atomisp/pci/ia_css_firmware.h Mauro Carvalho Chehab 2020-05-07 @52 ia_css_load_firmware(struct device *dev, const struct ia_css_env *env,
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 53 const struct ia_css_fw *fw);
ad85094b293e40e drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 54

:::::: The code at line 52 was first introduced by commit
:::::: 8568fe630066a733456fb1ffc8e1402191d7e27c media: atomisp: print a better message when fw version is wrong

:::::: TO: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
:::::: CC: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip