drivers/net/can/rcar/rcar_canfd.c:2020:34: warning: unused variable 'rcar_canfd_of_table'

From: kernel test robot
Date: Sat Sep 04 2021 - 01:39:03 EST


Hi Cai,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f1583cb1be35c23df60b1c39e3e7e6704d749d0b
commit: ac4224087312d7212bd3411f1e393f4b7cb1ff15 can: rcar: Kconfig: Add helper dependency on COMPILE_TEST
date: 10 days ago
config: hexagon-buildonly-randconfig-r002-20210904 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1104e3258b5064e7110cc297e2cec60ac9acfc0a)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ac4224087312d7212bd3411f1e393f4b7cb1ff15
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ac4224087312d7212bd3411f1e393f4b7cb1ff15
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=hexagon

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/net/can/rcar/rcar_canfd.c:2020:34: warning: unused variable 'rcar_canfd_of_table' [-Wunused-const-variable]
static const struct of_device_id rcar_canfd_of_table[] = {
^
1 warning generated.


vim +/rcar_canfd_of_table +2020 drivers/net/can/rcar/rcar_canfd.c

dd3bd23eb438919a Ramesh Shanmugasundaram 2016-06-17 2016
dd3bd23eb438919a Ramesh Shanmugasundaram 2016-06-17 2017 static SIMPLE_DEV_PM_OPS(rcar_canfd_pm_ops, rcar_canfd_suspend,
dd3bd23eb438919a Ramesh Shanmugasundaram 2016-06-17 2018 rcar_canfd_resume);
dd3bd23eb438919a Ramesh Shanmugasundaram 2016-06-17 2019
dd3bd23eb438919a Ramesh Shanmugasundaram 2016-06-17 @2020 static const struct of_device_id rcar_canfd_of_table[] = {
76e9353a80e9e9ff Lad Prabhakar 2021-07-27 2021 { .compatible = "renesas,rcar-gen3-canfd", .data = (void *)RENESAS_RCAR_GEN3 },
76e9353a80e9e9ff Lad Prabhakar 2021-07-27 2022 { .compatible = "renesas,rzg2l-canfd", .data = (void *)RENESAS_RZG2L },
dd3bd23eb438919a Ramesh Shanmugasundaram 2016-06-17 2023 { }
dd3bd23eb438919a Ramesh Shanmugasundaram 2016-06-17 2024 };
dd3bd23eb438919a Ramesh Shanmugasundaram 2016-06-17 2025

:::::: The code at line 2020 was first introduced by commit
:::::: dd3bd23eb438919aeeb73a7116642731ef8f73a8 can: rcar_canfd: Add Renesas R-Car CAN FD driver

:::::: TO: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@xxxxxxxxxxxxxx>
:::::: CC: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip