drivers/net/dsa/ocelot/ocelot_ext.c:144:34: warning: 'ocelot_ext_switch_of_match' defined but not used

From: kernel test robot
Date: Sun Mar 05 2023 - 18:19:59 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f915322fe014c5c515119381e886faf07b3c9d31
commit: 3d7316ac81ac329efce221b5584138e8c637a7b1 net: dsa: ocelot: add external ocelot switch control
date: 5 weeks ago
config: i386-buildonly-randconfig-r006-20230306 (https://download.01.org/0day-ci/archive/20230306/202303060716.BDSREmLN-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3d7316ac81ac329efce221b5584138e8c637a7b1
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 3d7316ac81ac329efce221b5584138e8c637a7b1
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/dsa/ocelot/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303060716.BDSREmLN-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/net/dsa/ocelot/ocelot_ext.c:144:34: warning: 'ocelot_ext_switch_of_match' defined but not used [-Wunused-const-variable=]
144 | static const struct of_device_id ocelot_ext_switch_of_match[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/ocelot_ext_switch_of_match +144 drivers/net/dsa/ocelot/ocelot_ext.c

143
> 144 static const struct of_device_id ocelot_ext_switch_of_match[] = {
145 { .compatible = "mscc,vsc7512-switch" },
146 { },
147 };
148 MODULE_DEVICE_TABLE(of, ocelot_ext_switch_of_match);
149

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests