Re: [PATCH -next] scsi: ufs: fix build warning without CONFIG_PM

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

 



Hi YueHaibing,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20210615]

url:    https://github.com/0day-ci/linux/commits/YueHaibing/scsi-ufs-fix-build-warning-without-CONFIG_PM/20210616-183217
base:    19ae1f2bd9c091059f80646604ccef8a1e614f57
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.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/0day-ci/linux/commit/6874b79b80a6d8905fe434342e4233b23c3b2104
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review YueHaibing/scsi-ufs-fix-build-warning-without-CONFIG_PM/20210616-183217
        git checkout 6874b79b80a6d8905fe434342e4233b23c3b2104
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from include/linux/device.h:25,
                    from include/linux/async.h:14,
                    from drivers/scsi/ufs/ufshcd.c:12:
>> drivers/scsi/ufs/ufshcd.c:9728:21: error: 'ufshcd_wl_runtime_suspend' undeclared here (not in a function); did you mean 'ufshcd_runtime_suspend'?
    9728 |  SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/pm.h:341:21: note: in definition of macro 'SET_RUNTIME_PM_OPS'
     341 |  .runtime_suspend = suspend_fn, \
         |                     ^~~~~~~~~~
>> drivers/scsi/ufs/ufshcd.c:9728:48: error: 'ufshcd_wl_runtime_resume' undeclared here (not in a function); did you mean 'ufshcd_runtime_resume'?
    9728 |  SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
         |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/pm.h:342:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
     342 |  .runtime_resume = resume_fn, \
         |                    ^~~~~~~~~
>> drivers/scsi/ufs/ufshcd.c:9781:27: error: 'ufshcd_rpmb_resume' undeclared here (not in a function); did you mean 'ufshcd_vops_resume'?
    9781 |  SET_RUNTIME_PM_OPS(NULL, ufshcd_rpmb_resume, NULL)
         |                           ^~~~~~~~~~~~~~~~~~
   include/linux/pm.h:342:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
     342 |  .runtime_resume = resume_fn, \
         |                    ^~~~~~~~~
   In file included from include/linux/perf_event.h:25,
                    from include/linux/trace_events.h:10,
                    from include/trace/trace_events.h:21,
                    from include/trace/define_trace.h:102,
                    from include/trace/events/ufs.h:396,
                    from drivers/scsi/ufs/ufshcd.c:31:
   arch/arc/include/asm/perf_event.h:126:23: warning: 'arc_pmu_cache_map' defined but not used [-Wunused-const-variable=]
     126 | static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
         |                       ^~~~~~~~~~~~~~~~~
   arch/arc/include/asm/perf_event.h:91:27: warning: 'arc_pmu_ev_hw_map' defined but not used [-Wunused-const-variable=]
      91 | static const char * const arc_pmu_ev_hw_map[] = {
         |                           ^~~~~~~~~~~~~~~~~


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

b294ff3e34490f Asutosh Das 2021-04-23  9718  
b294ff3e34490f Asutosh Das 2021-04-23  9719  static const struct dev_pm_ops ufshcd_wl_pm_ops = {
b294ff3e34490f Asutosh Das 2021-04-23  9720  #ifdef CONFIG_PM_SLEEP
b294ff3e34490f Asutosh Das 2021-04-23  9721  	.suspend = ufshcd_wl_suspend,
b294ff3e34490f Asutosh Das 2021-04-23  9722  	.resume = ufshcd_wl_resume,
b294ff3e34490f Asutosh Das 2021-04-23  9723  	.freeze = ufshcd_wl_suspend,
b294ff3e34490f Asutosh Das 2021-04-23  9724  	.thaw = ufshcd_wl_resume,
b294ff3e34490f Asutosh Das 2021-04-23  9725  	.poweroff = ufshcd_wl_poweroff,
b294ff3e34490f Asutosh Das 2021-04-23  9726  	.restore = ufshcd_wl_resume,
b294ff3e34490f Asutosh Das 2021-04-23  9727  #endif
b294ff3e34490f Asutosh Das 2021-04-23 @9728  	SET_RUNTIME_PM_OPS(ufshcd_wl_runtime_suspend, ufshcd_wl_runtime_resume, NULL)
b294ff3e34490f Asutosh Das 2021-04-23  9729  };
b294ff3e34490f Asutosh Das 2021-04-23  9730  
b294ff3e34490f Asutosh Das 2021-04-23  9731  /*
b294ff3e34490f Asutosh Das 2021-04-23  9732   * ufs_dev_wlun_template - describes ufs device wlun
b294ff3e34490f Asutosh Das 2021-04-23  9733   * ufs-device wlun - used to send pm commands
b294ff3e34490f Asutosh Das 2021-04-23  9734   * All luns are consumers of ufs-device wlun.
b294ff3e34490f Asutosh Das 2021-04-23  9735   *
b294ff3e34490f Asutosh Das 2021-04-23  9736   * Currently, no sd driver is present for wluns.
b294ff3e34490f Asutosh Das 2021-04-23  9737   * Hence the no specific pm operations are performed.
b294ff3e34490f Asutosh Das 2021-04-23  9738   * With ufs design, SSU should be sent to ufs-device wlun.
b294ff3e34490f Asutosh Das 2021-04-23  9739   * Hence register a scsi driver for ufs wluns only.
b294ff3e34490f Asutosh Das 2021-04-23  9740   */
b294ff3e34490f Asutosh Das 2021-04-23  9741  static struct scsi_driver ufs_dev_wlun_template = {
b294ff3e34490f Asutosh Das 2021-04-23  9742  	.gendrv = {
b294ff3e34490f Asutosh Das 2021-04-23  9743  		.name = "ufs_device_wlun",
b294ff3e34490f Asutosh Das 2021-04-23  9744  		.owner = THIS_MODULE,
b294ff3e34490f Asutosh Das 2021-04-23  9745  		.probe = ufshcd_wl_probe,
b294ff3e34490f Asutosh Das 2021-04-23  9746  		.remove = ufshcd_wl_remove,
b294ff3e34490f Asutosh Das 2021-04-23  9747  		.pm = &ufshcd_wl_pm_ops,
b294ff3e34490f Asutosh Das 2021-04-23  9748  		.shutdown = ufshcd_wl_shutdown,
b294ff3e34490f Asutosh Das 2021-04-23  9749  	},
b294ff3e34490f Asutosh Das 2021-04-23  9750  };
b294ff3e34490f Asutosh Das 2021-04-23  9751  
b294ff3e34490f Asutosh Das 2021-04-23  9752  static int ufshcd_rpmb_probe(struct device *dev)
b294ff3e34490f Asutosh Das 2021-04-23  9753  {
b294ff3e34490f Asutosh Das 2021-04-23  9754  	return is_rpmb_wlun(to_scsi_device(dev)) ? 0 : -ENODEV;
b294ff3e34490f Asutosh Das 2021-04-23  9755  }
b294ff3e34490f Asutosh Das 2021-04-23  9756  
b294ff3e34490f Asutosh Das 2021-04-23  9757  static inline int ufshcd_clear_rpmb_uac(struct ufs_hba *hba)
b294ff3e34490f Asutosh Das 2021-04-23  9758  {
b294ff3e34490f Asutosh Das 2021-04-23  9759  	int ret = 0;
b294ff3e34490f Asutosh Das 2021-04-23  9760  
b294ff3e34490f Asutosh Das 2021-04-23  9761  	if (!hba->wlun_rpmb_clr_ua)
b294ff3e34490f Asutosh Das 2021-04-23  9762  		return 0;
b294ff3e34490f Asutosh Das 2021-04-23  9763  	ret = ufshcd_clear_ua_wlun(hba, UFS_UPIU_RPMB_WLUN);
b294ff3e34490f Asutosh Das 2021-04-23  9764  	if (!ret)
b294ff3e34490f Asutosh Das 2021-04-23  9765  		hba->wlun_rpmb_clr_ua = 0;
b294ff3e34490f Asutosh Das 2021-04-23  9766  	return ret;
b294ff3e34490f Asutosh Das 2021-04-23  9767  }
b294ff3e34490f Asutosh Das 2021-04-23  9768  
6874b79b80a6d8 YueHaibing  2021-06-11  9769  #ifdef CONFIG_PM_SLEEP
b294ff3e34490f Asutosh Das 2021-04-23  9770  static int ufshcd_rpmb_resume(struct device *dev)
b294ff3e34490f Asutosh Das 2021-04-23  9771  {
b294ff3e34490f Asutosh Das 2021-04-23  9772  	struct ufs_hba *hba = wlun_dev_to_hba(dev);
b294ff3e34490f Asutosh Das 2021-04-23  9773  
b294ff3e34490f Asutosh Das 2021-04-23  9774  	if (hba->sdev_rpmb)
b294ff3e34490f Asutosh Das 2021-04-23  9775  		ufshcd_clear_rpmb_uac(hba);
b294ff3e34490f Asutosh Das 2021-04-23  9776  	return 0;
b294ff3e34490f Asutosh Das 2021-04-23  9777  }
6874b79b80a6d8 YueHaibing  2021-06-11  9778  #endif
b294ff3e34490f Asutosh Das 2021-04-23  9779  
b294ff3e34490f Asutosh Das 2021-04-23  9780  static const struct dev_pm_ops ufs_rpmb_pm_ops = {
b294ff3e34490f Asutosh Das 2021-04-23 @9781  	SET_RUNTIME_PM_OPS(NULL, ufshcd_rpmb_resume, NULL)
b294ff3e34490f Asutosh Das 2021-04-23  9782  	SET_SYSTEM_SLEEP_PM_OPS(NULL, ufshcd_rpmb_resume)
b294ff3e34490f Asutosh Das 2021-04-23  9783  };
b294ff3e34490f Asutosh Das 2021-04-23  9784  

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

Attachment: .config.gz
Description: application/gzip


[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