* [bvanassche:ufs-for-next 306/307] drivers/scsi/ufs/ufshcd.c:8314:14: warning: variable 'name' set but not used
@ 2022-03-18 21:20 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-03-18 21:20 UTC (permalink / raw)
To: Bart Van Assche; +Cc: llvm, kbuild-all, linux-kernel
tree: https://github.com/bvanassche/linux ufs-for-next
head: 366c4aa8768b5193b782c809d7aba916d4e382da
commit: a8a69970d87f778e000ae1b15e18061c09aa0f7b [306/307] scsi: ufs: Remove unused constants and code
config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20220319/202203190505.1qKIBoB1-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6e70e4056dff962ec634c5bd4f2f4105a0bef71)
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://github.com/bvanassche/linux/commit/a8a69970d87f778e000ae1b15e18061c09aa0f7b
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche ufs-for-next
git checkout a8a69970d87f778e000ae1b15e18061c09aa0f7b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/scsi/ufs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/scsi/ufs/ufshcd.c:8314:14: warning: variable 'name' set but not used [-Wunused-but-set-variable]
const char *name;
^
1 warning generated.
vim +/name +8314 drivers/scsi/ufs/ufshcd.c
57d104c153d3d6d Subhash Jadavani 2014-09-25 8308
aa497613093412e Sujit Reddy Thumma 2014-09-25 8309 static int ufshcd_config_vreg(struct device *dev,
aa497613093412e Sujit Reddy Thumma 2014-09-25 8310 struct ufs_vreg *vreg, bool on)
aa497613093412e Sujit Reddy Thumma 2014-09-25 8311 {
aa497613093412e Sujit Reddy Thumma 2014-09-25 8312 int ret = 0;
727535903bea924 Gustavo A. R. Silva 2017-11-20 8313 struct regulator *reg;
727535903bea924 Gustavo A. R. Silva 2017-11-20 @8314 const char *name;
a8a69970d87f778 Bart Van Assche 2021-12-08 8315 int uA_load;
aa497613093412e Sujit Reddy Thumma 2014-09-25 8316
aa497613093412e Sujit Reddy Thumma 2014-09-25 8317 BUG_ON(!vreg);
aa497613093412e Sujit Reddy Thumma 2014-09-25 8318
727535903bea924 Gustavo A. R. Silva 2017-11-20 8319 reg = vreg->reg;
727535903bea924 Gustavo A. R. Silva 2017-11-20 8320 name = vreg->name;
727535903bea924 Gustavo A. R. Silva 2017-11-20 8321
aa497613093412e Sujit Reddy Thumma 2014-09-25 8322 if (regulator_count_voltages(reg) > 0) {
90d88f47e8d03b2 Asutosh Das 2020-02-10 8323 uA_load = on ? vreg->max_uA : 0;
90d88f47e8d03b2 Asutosh Das 2020-02-10 8324 ret = ufshcd_config_vreg_load(dev, vreg, uA_load);
3b141e8cfd54ba3 Stanley Chu 2019-03-28 8325 }
a8a69970d87f778 Bart Van Assche 2021-12-08 8326
aa497613093412e Sujit Reddy Thumma 2014-09-25 8327 return ret;
aa497613093412e Sujit Reddy Thumma 2014-09-25 8328 }
aa497613093412e Sujit Reddy Thumma 2014-09-25 8329
:::::: The code at line 8314 was first introduced by commit
:::::: 727535903bea924c4f73abb202c4b3e85fff0ca4 scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg
:::::: TO: Gustavo A. R. Silva <garsilva@embeddedor.com>
:::::: CC: Martin K. Petersen <martin.petersen@oracle.com>
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-18 21:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 21:20 [bvanassche:ufs-for-next 306/307] drivers/scsi/ufs/ufshcd.c:8314:14: warning: variable 'name' set but not used kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.