drivers/hwspinlock/sprd_hwspinlock.c:141:34: warning: unused variable 'sprd_hwspinlock_of_match'

From: kernel test robot
Date: Sat Oct 17 2020 - 14:28:09 EST


Hi Baolin,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 071a0578b0ce0b0e543d1e38ee6926b9cc21c198
commit: ffd0bbfb378ecd56eac22bf932ccdbf89ac7f725 hwspinlock: Allow drivers to be built with COMPILE_TEST
date: 7 months ago
config: x86_64-randconfig-r005-20201018 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 50cc9a0e6124f6177633b9e5edcee25860cfa094)
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=ffd0bbfb378ecd56eac22bf932ccdbf89ac7f725
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ffd0bbfb378ecd56eac22bf932ccdbf89ac7f725
# 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 >>):

>> drivers/hwspinlock/sprd_hwspinlock.c:141:34: warning: unused variable 'sprd_hwspinlock_of_match' [-Wunused-const-variable]
static const struct of_device_id sprd_hwspinlock_of_match[] = {
^
1 warning generated.

vim +/sprd_hwspinlock_of_match +141 drivers/hwspinlock/sprd_hwspinlock.c

d8c8bbbb1aba547 Baolin Wang 2017-05-17 140
d8c8bbbb1aba547 Baolin Wang 2017-05-17 @141 static const struct of_device_id sprd_hwspinlock_of_match[] = {
d8c8bbbb1aba547 Baolin Wang 2017-05-17 142 { .compatible = "sprd,hwspinlock-r3p0", },
d8c8bbbb1aba547 Baolin Wang 2017-05-17 143 { /* sentinel */ }
d8c8bbbb1aba547 Baolin Wang 2017-05-17 144 };
d8c8bbbb1aba547 Baolin Wang 2017-05-17 145 MODULE_DEVICE_TABLE(of, sprd_hwspinlock_of_match);
d8c8bbbb1aba547 Baolin Wang 2017-05-17 146

:::::: The code at line 141 was first introduced by commit
:::::: d8c8bbbb1aba547b6c0d534f87fc68aa338658fc hwspinlock: sprd: Add hardware spinlock driver

:::::: TO: Baolin Wang <baolin.wang@xxxxxxxxxxxxxx>
:::::: CC: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip