Re: [PATCH] ufs: core: Add WB buffer resize support

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

 



Hi Huan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jejb-scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master v6.12-rc4 next-20241025]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Huan-Tang/ufs-core-Add-WB-buffer-resize-support/20241025-170131
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link:    https://lore.kernel.org/r/20241025085924.4855-1-tanghuan%40vivo.com
patch subject: [PATCH] ufs: core: Add WB buffer resize support
config: arm-randconfig-004-20241026 (https://download.01.org/0day-ci/archive/20241026/202410260352.WRMItCze-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241026/202410260352.WRMItCze-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410260352.WRMItCze-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/ufs/core/ufs-sysfs.c: In function 'wb_toggle_buf_resize_store':
>> drivers/ufs/core/ufs-sysfs.c:419:12: warning: variable 'index' set but not used [-Wunused-but-set-variable]
     419 |         u8 index;
         |            ^~~~~


vim +/index +419 drivers/ufs/core/ufs-sysfs.c

   413	
   414	static ssize_t wb_toggle_buf_resize_store(struct device *dev,
   415			struct device_attribute *attr, const char *buf, size_t count)
   416	{
   417		struct ufs_hba *hba = dev_get_drvdata(dev);
   418		unsigned int wb_buf_resize_op;
 > 419		u8 index;
   420		ssize_t res;
   421	
   422		if (!ufshcd_is_wb_allowed(hba) || !hba->dev_info.wb_enabled ||
   423			!hba->dev_info.b_presrv_uspc_en) {
   424			dev_err(dev, "The WB buf resize is not allowed!\n");
   425			return -EOPNOTSUPP;
   426		}
   427	
   428		if (kstrtouint(buf, 0, &wb_buf_resize_op))
   429			return -EINVAL;
   430	
   431		if (wb_buf_resize_op != 0x01 && wb_buf_resize_op != 0x02) {
   432			dev_err(dev, "The operation %u is invalid!\n", wb_buf_resize_op);
   433			return -EINVAL;
   434		}
   435	
   436		down(&hba->host_sem);
   437		if (!ufshcd_is_user_access_allowed(hba)) {
   438			res = -EBUSY;
   439			goto out;
   440		}
   441	
   442		index = ufshcd_wb_get_query_index(hba);
   443		ufshcd_rpm_get_sync(hba);
   444		res = ufshcd_wb_toggle_buf_resize(hba, wb_buf_resize_op);
   445		ufshcd_rpm_put_sync(hba);
   446	
   447	out:
   448		up(&hba->host_sem);
   449		return res < 0 ? res : count;
   450	}
   451	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux