Re: [PATCH v18 1/2] scsi: ufs: Enable power management for wlun

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

 



Hi Asutosh,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next next-20210414]
[cannot apply to tip/perf/core v5.12-rc7]
[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/0day-ci/linux/commits/Asutosh-Das/Enable-power-management-for-ufs-wlun/20210415-030146
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-a002-20210414 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/9bad6c1c707d2a9974aa90e3399e510ec06c77f2
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Asutosh-Das/Enable-power-management-for-ufs-wlun/20210415-030146
        git checkout 9bad6c1c707d2a9974aa90e3399e510ec06c77f2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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/ufshcd.c:9136:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (pm_runtime_suspended(hba->dev))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/ufs/ufshcd.c:9141:50: note: uninitialized use occurs here
           trace_ufshcd_system_suspend(dev_name(hba->dev), ret,
                                                           ^~~
   drivers/scsi/ufs/ufshcd.c:9136:2: note: remove the 'if' if its condition is always false
           if (pm_runtime_suspended(hba->dev))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/ufs/ufshcd.c:9133:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   drivers/scsi/ufs/ufshcd.c:9160:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (pm_runtime_suspended(hba->dev))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/ufs/ufshcd.c:9166:49: note: uninitialized use occurs here
           trace_ufshcd_system_resume(dev_name(hba->dev), ret,
                                                          ^~~
   drivers/scsi/ufs/ufshcd.c:9160:2: note: remove the 'if' if its condition is always false
           if (pm_runtime_suspended(hba->dev))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/scsi/ufs/ufshcd.c:9157:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   drivers/scsi/ufs/ufshcd.c:9679:12: warning: unused function 'ufshcd_rpmb_resume' [-Wunused-function]
   static int ufshcd_rpmb_resume(struct device *dev)
              ^
   3 warnings generated.


vim +9136 drivers/scsi/ufs/ufshcd.c

  9121	
  9122	/**
  9123	 * ufshcd_system_suspend - system suspend routine
  9124	 * @hba: per adapter instance
  9125	 *
  9126	 * Check the description of ufshcd_suspend() function for more details.
  9127	 * Also check the description of __ufshcd_wl_suspend().
  9128	 *
  9129	 * Returns 0 for success and non-zero for failure
  9130	 */
  9131	int ufshcd_system_suspend(struct ufs_hba *hba)
  9132	{
  9133		int ret;
  9134		ktime_t start = ktime_get();
  9135	
> 9136		if (pm_runtime_suspended(hba->dev))
  9137			goto out;
  9138	
  9139		ret = ufshcd_suspend(hba);
  9140	out:
  9141		trace_ufshcd_system_suspend(dev_name(hba->dev), ret,
  9142			ktime_to_us(ktime_sub(ktime_get(), start)),
  9143			hba->curr_dev_pwr_mode, hba->uic_link_state);
  9144		return ret;
  9145	}
  9146	EXPORT_SYMBOL(ufshcd_system_suspend);
  9147	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux