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: Wed Dec 09 2020 - 05:39:01 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a68a0262abdaa251e12c53715f48e698a18ef402
commit: 13c01139b17163c9b2aa543a9c39f8bbc875b625 x86/headers: Remove APIC headers from <asm/smp.h>
date: 4 months ago
config: x86_64-randconfig-r005-20201209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1968804ac726e7674d5de22bc2204b45857da344)
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=13c01139b17163c9b2aa543a9c39f8bbc875b625
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 13c01139b17163c9b2aa543a9c39f8bbc875b625
# 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

ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 32
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 33 /* @brief Loads the firmware
ad85094b293e40 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
ad85094b293e40 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
ad85094b293e40 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
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 37 * printing.
ad85094b293e40 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
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 39 * predefined ISP binaries.
41022d35ddf219 drivers/staging/media/atomisp/pci/ia_css_firmware.h Mauro Carvalho Chehab 2020-05-28 40 * @return Returns -EINVAL in case of any
41022d35ddf219 drivers/staging/media/atomisp/pci/ia_css_firmware.h Mauro Carvalho Chehab 2020-05-28 41 * errors and 0 otherwise.
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 42 *
ad85094b293e40 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
ad85094b293e40 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
ad85094b293e40 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.
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 46 *
ad85094b293e40 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
ad85094b293e40 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
ad85094b293e40 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).
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 50 */
41022d35ddf219 drivers/staging/media/atomisp/pci/ia_css_firmware.h Mauro Carvalho Chehab 2020-05-28 51 int
8568fe630066a7 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,
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h Mauro Carvalho Chehab 2020-04-19 53 const struct ia_css_fw *fw);
ad85094b293e40 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