drivers/net/dsa/microchip/ksz9477_i2c.c:89:34: warning: 'ksz9477_dt_ids' defined but not used

From: kernel test robot
Date: Sun Aug 14 2022 - 20:43:56 EST


Hi Arun,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9f162193d6e48eb4ff51c2ea3612f1daebca1b7e
commit: 07bca160469b4d19ca0a35bc83b26ed18fcbd96d net: dsa: microchip: common menuconfig for ksz series switch
date: 7 weeks ago
config: x86_64-buildonly-randconfig-r002-20220815 (https://download.01.org/0day-ci/archive/20220815/202208150803.dDl0Nq6W-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=07bca160469b4d19ca0a35bc83b26ed18fcbd96d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 07bca160469b4d19ca0a35bc83b26ed18fcbd96d
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/dsa/microchip/

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

All warnings (new ones prefixed by >>):

>> drivers/net/dsa/microchip/ksz9477_i2c.c:89:34: warning: 'ksz9477_dt_ids' defined but not used [-Wunused-const-variable=]
89 | static const struct of_device_id ksz9477_dt_ids[] = {
| ^~~~~~~~~~~~~~


vim +/ksz9477_dt_ids +89 drivers/net/dsa/microchip/ksz9477_i2c.c

20e03777d70923 Tristram Ha 2019-09-10 88
20e03777d70923 Tristram Ha 2019-09-10 @89 static const struct of_device_id ksz9477_dt_ids[] = {
eee16b147121ce Arun Ramadoss 2022-05-17 90 {
eee16b147121ce Arun Ramadoss 2022-05-17 91 .compatible = "microchip,ksz9477",
eee16b147121ce Arun Ramadoss 2022-05-17 92 .data = &ksz_switch_chips[KSZ9477]
eee16b147121ce Arun Ramadoss 2022-05-17 93 },
eee16b147121ce Arun Ramadoss 2022-05-17 94 {
eee16b147121ce Arun Ramadoss 2022-05-17 95 .compatible = "microchip,ksz9897",
eee16b147121ce Arun Ramadoss 2022-05-17 96 .data = &ksz_switch_chips[KSZ9897]
eee16b147121ce Arun Ramadoss 2022-05-17 97 },
eee16b147121ce Arun Ramadoss 2022-05-17 98 {
eee16b147121ce Arun Ramadoss 2022-05-17 99 .compatible = "microchip,ksz9893",
eee16b147121ce Arun Ramadoss 2022-05-17 100 .data = &ksz_switch_chips[KSZ9893]
eee16b147121ce Arun Ramadoss 2022-05-17 101 },
eee16b147121ce Arun Ramadoss 2022-05-17 102 {
eee16b147121ce Arun Ramadoss 2022-05-17 103 .compatible = "microchip,ksz9563",
eee16b147121ce Arun Ramadoss 2022-05-17 104 .data = &ksz_switch_chips[KSZ9893]
eee16b147121ce Arun Ramadoss 2022-05-17 105 },
eee16b147121ce Arun Ramadoss 2022-05-17 106 {
eee16b147121ce Arun Ramadoss 2022-05-17 107 .compatible = "microchip,ksz8563",
eee16b147121ce Arun Ramadoss 2022-05-17 108 .data = &ksz_switch_chips[KSZ9893]
eee16b147121ce Arun Ramadoss 2022-05-17 109 },
eee16b147121ce Arun Ramadoss 2022-05-17 110 {
eee16b147121ce Arun Ramadoss 2022-05-17 111 .compatible = "microchip,ksz9567",
eee16b147121ce Arun Ramadoss 2022-05-17 112 .data = &ksz_switch_chips[KSZ9567]
eee16b147121ce Arun Ramadoss 2022-05-17 113 },
20e03777d70923 Tristram Ha 2019-09-10 114 {},
20e03777d70923 Tristram Ha 2019-09-10 115 };
20e03777d70923 Tristram Ha 2019-09-10 116 MODULE_DEVICE_TABLE(of, ksz9477_dt_ids);
20e03777d70923 Tristram Ha 2019-09-10 117

:::::: The code at line 89 was first introduced by commit
:::::: 20e03777d70923fe7eae0d7f043ef9488393ab95 net: dsa: microchip: add KSZ9477 I2C driver

:::::: TO: Tristram Ha <Tristram.Ha@xxxxxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp