drivers/net/dsa/microchip/ksz9477_i2c.c:77:34: warning: unused variable 'ksz9477_dt_ids'
From: kernel test robot
Date: Tue Aug 11 2020 - 19:42:01 EST
Hi Tristram,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bb5baaa9238ecf8f13b112232c7bbe0d3d598ee8
commit: 20e03777d70923fe7eae0d7f043ef9488393ab95 net: dsa: microchip: add KSZ9477 I2C driver
date: 11 months ago
config: x86_64-randconfig-r032-20200812 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 4f2ad15db535873dda9bfe248a2771023b64a43c)
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
git checkout 20e03777d70923fe7eae0d7f043ef9488393ab95
# 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 >>):
^
include/linux/jhash.h:95:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 6: b += (u32)k[5]<<8; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:95:2: note: insert 'break;' to avoid fall-through
case 6: b += (u32)k[5]<<8; /* fall through */
^
break;
include/linux/jhash.h:96:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 5: b += k[4]; /* fall through */
^
include/linux/jhash.h:96:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 5: b += k[4]; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:96:2: note: insert 'break;' to avoid fall-through
case 5: b += k[4]; /* fall through */
^
break;
include/linux/jhash.h:97:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 4: a += (u32)k[3]<<24; /* fall through */
^
include/linux/jhash.h:97:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 4: a += (u32)k[3]<<24; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:97:2: note: insert 'break;' to avoid fall-through
case 4: a += (u32)k[3]<<24; /* fall through */
^
break;
include/linux/jhash.h:98:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 3: a += (u32)k[2]<<16; /* fall through */
^
include/linux/jhash.h:98:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 3: a += (u32)k[2]<<16; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:98:2: note: insert 'break;' to avoid fall-through
case 3: a += (u32)k[2]<<16; /* fall through */
^
break;
include/linux/jhash.h:99:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 2: a += (u32)k[1]<<8; /* fall through */
^
include/linux/jhash.h:99:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 2: a += (u32)k[1]<<8; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:99:2: note: insert 'break;' to avoid fall-through
case 2: a += (u32)k[1]<<8; /* fall through */
^
break;
include/linux/jhash.h:100:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 1: a += k[0];
^
include/linux/jhash.h:100:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 1: a += k[0];
^
__attribute__((fallthrough));
include/linux/jhash.h:100:2: note: insert 'break;' to avoid fall-through
case 1: a += k[0];
^
break;
include/linux/jhash.h:102:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 0: /* Nothing left to add */
^
include/linux/jhash.h:102:2: note: insert 'break;' to avoid fall-through
case 0: /* Nothing left to add */
^
break;
include/linux/jhash.h:136:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 2: b += k[1]; /* fall through */
^
include/linux/jhash.h:136:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 2: b += k[1]; /* fall through */
^
__attribute__((fallthrough));
include/linux/jhash.h:136:2: note: insert 'break;' to avoid fall-through
case 2: b += k[1]; /* fall through */
^
break;
include/linux/jhash.h:137:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 1: a += k[0];
^
include/linux/jhash.h:137:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 1: a += k[0];
^
__attribute__((fallthrough));
include/linux/jhash.h:137:2: note: insert 'break;' to avoid fall-through
case 1: a += k[0];
^
break;
include/linux/jhash.h:139:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 0: /* Nothing left to add */
^
include/linux/jhash.h:139:2: note: insert 'break;' to avoid fall-through
case 0: /* Nothing left to add */
^
break;
>> drivers/net/dsa/microchip/ksz9477_i2c.c:77:34: warning: unused variable 'ksz9477_dt_ids' [-Wunused-const-variable]
static const struct of_device_id ksz9477_dt_ids[] = {
^
37 warnings generated.
vim +/ksz9477_dt_ids +77 drivers/net/dsa/microchip/ksz9477_i2c.c
76
> 77 static const struct of_device_id ksz9477_dt_ids[] = {
78 { .compatible = "microchip,ksz9477" },
79 { .compatible = "microchip,ksz9897" },
80 {},
81 };
82 MODULE_DEVICE_TABLE(of, ksz9477_dt_ids);
83
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip