[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203190421.HAgrodHA-lkp@intel.com>
Date: Sat, 19 Mar 2022 04:49:31 +0800
From: kernel test robot <lkp@...el.com>
To: Bart Van Assche <bvanassche@....org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [bvanassche:ufs-for-next 306/307] drivers/scsi/ufs/ufshcd.c:8314:21:
warning: variable 'name' set but not used
tree: https://github.com/bvanassche/linux ufs-for-next
head: 366c4aa8768b5193b782c809d7aba916d4e382da
commit: a8a69970d87f778e000ae1b15e18061c09aa0f7b [306/307] scsi: ufs: Remove unused constants and code
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220319/202203190421.HAgrodHA-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.2.0
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=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/scsi/ufs/ sound/soc/codecs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/scsi/ufs/ufshcd.c: In function 'ufshcd_config_vreg':
>> drivers/scsi/ufs/ufshcd.c:8314:21: warning: variable 'name' set but not used [-Wunused-but-set-variable]
8314 | const char *name;
| ^~~~
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@...eddedor.com>
:::::: CC: Martin K. Petersen <martin.petersen@...cle.com>
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists