drivers/mfd/arizona-i2c.c:108:27: sparse: sparse: symbol 'arizona_i2c_of_match' was not declared. Should it be static?

From: kernel test robot
Date: Tue Nov 16 2021 - 09:08:33 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 3f65555c417c9c2eee235a137b5e5088a65439e4 mfd: arizona: Split of_match table into I2C and SPI versions
date: 11 days ago
config: sparc64-randconfig-s031-20211116 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3f65555c417c9c2eee235a137b5e5088a65439e4
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 3f65555c417c9c2eee235a137b5e5088a65439e4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash drivers/mfd/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/mfd/arizona-i2c.c:108:27: sparse: sparse: symbol 'arizona_i2c_of_match' was not declared. Should it be static?
--
>> drivers/mfd/arizona-spi.c:229:27: sparse: sparse: symbol 'arizona_spi_of_match' was not declared. Should it be static?

vim +/arizona_i2c_of_match +108 drivers/mfd/arizona-i2c.c

106
107 #ifdef CONFIG_OF
> 108 const struct of_device_id arizona_i2c_of_match[] = {
109 { .compatible = "wlf,wm5102", .data = (void *)WM5102 },
110 { .compatible = "wlf,wm5110", .data = (void *)WM5110 },
111 { .compatible = "wlf,wm8280", .data = (void *)WM8280 },
112 { .compatible = "wlf,wm8997", .data = (void *)WM8997 },
113 { .compatible = "wlf,wm8998", .data = (void *)WM8998 },
114 { .compatible = "wlf,wm1814", .data = (void *)WM1814 },
115 {},
116 };
117 #endif
118

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

Attachment: .config.gz
Description: application/gzip