Re: [PATCH v3 4/7] scsi: ufs-renesas: Add support for Renesas R-Car UFS controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yoshihiro,

I love your patch! Perhaps something to improve:

[auto build test WARNING on geert-renesas-devel/next]
[also build test WARNING on v5.18-rc3 next-20220419]
[cannot apply to mkp-scsi/for-next jejb-scsi/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Yoshihiro-Shimoda/treewide-scsi-ufs-Add-support-for-Renesas-R-Car-UFS-controller/20220419-201020
base:   https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20220420/202204200731.hTb71eG4-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c1c49a356162b22554088d269f7689bdb044a9f1)
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/intel-lab-lkp/linux/commit/3dca0de1a5ecda3be36402f3261cf286ce9dce64
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Yoshihiro-Shimoda/treewide-scsi-ufs-Add-support-for-Renesas-R-Car-UFS-controller/20220419-201020
        git checkout 3dca0de1a5ecda3be36402f3261cf286ce9dce64
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/scsi/ufs/

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/scsi/ufs/ufs-renesas.c:304:15: warning: variable 'val' is uninitialized when used here [-Wuninitialized]
                            p->index, val);
                                      ^~~
   include/linux/printk.h:570:26: note: expanded from macro 'pr_debug'
           dynamic_pr_debug(fmt, ##__VA_ARGS__)
                                   ^~~~~~~~~~~
   include/linux/dynamic_debug.h:163:22: note: expanded from macro 'dynamic_pr_debug'
                              pr_fmt(fmt), ##__VA_ARGS__)
                                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:152:56: note: expanded from macro '_dynamic_func_call'
           __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
                                                                 ^~~~~~~~~~~
   include/linux/dynamic_debug.h:134:15: note: expanded from macro '__dynamic_func_call'
                   func(&id, ##__VA_ARGS__);               \
                               ^~~~~~~~~~~
   drivers/scsi/ufs/ufs-renesas.c:285:9: note: initialize the variable 'val' to silence this warning
           u32 val;
                  ^
                   = 0
   1 warning generated.


vim +/val +304 drivers/scsi/ufs/ufs-renesas.c

   279	
   280	static void ufs_renesas_reg_control(struct ufs_hba *hba,
   281					    const struct ufs_renesas_init_param *p)
   282	{
   283		static u32 save[MAX_INDEX];
   284		int ret;
   285		u32 val;
   286	
   287		pr_debug("%s: %d %04x %08x, %08x, %d\n", __func__, p->mode, p->reg,
   288			 p->u.val, p->mask, p->index);
   289	
   290		WARN_ON(p->index >= MAX_INDEX);
   291	
   292		switch (p->mode) {
   293		case MODE_RESTORE:
   294			ufshcd_writel(hba, save[p->index], p->reg);
   295			break;
   296		case MODE_SET:
   297			pr_debug("%s: %d %x %x\n", __func__, p->index, save[p->index],
   298				 p->u.set);
   299			save[p->index] |= p->u.set;
   300			break;
   301		case MODE_SAVE:
   302			save[p->index] = ufshcd_readl(hba, p->reg) & p->mask;
   303			pr_debug("%s: index = %d, val = %08x\n", __func__,
 > 304				 p->index, val);
   305			break;
   306		case MODE_POLL:
   307			ret = readl_poll_timeout_atomic(hba->mmio_base + p->reg,
   308							val,
   309							(val & p->mask) == p->u.expected,
   310							10, 1000);
   311			if (ret)
   312				pr_err("%s: poll failed %d (%08x, %08x, %08x)\n",
   313				       __func__, ret, val, p->mask, p->u.expected);
   314			break;
   315		case MODE_WAIT:
   316			if (p->u.delay_us > 1000)
   317				mdelay(p->u.delay_us / 1000);
   318			else
   319				udelay(p->u.delay_us);
   320			break;
   321		case MODE_WRITE:
   322			ufshcd_writel(hba, p->u.val, p->reg);
   323			break;
   324		default:
   325			break;
   326		}
   327	}
   328	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux