Hi Jaegeuk, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on scsi/for-next] [also build test WARNING on mkp-scsi/for-next linux/master linus/master v5.10-rc6 next-20201130] [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/Jaegeuk-Kim/scsi-ufs-clear-uac-for-RPMB-after-ufshcd-resets/20201201-121956 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next config: x86_64-randconfig-a006-20201201 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ac40a2d8f16b8a8c68fc811d67f647740e965cb8) 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/0636adf2e8880085b18818ce6e7ee878189b52ca git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Jaegeuk-Kim/scsi-ufs-clear-uac-for-RPMB-after-ufshcd-resets/20201201-121956 git checkout 0636adf2e8880085b18818ce6e7ee878189b52ca # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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:8398:1: warning: unused label 'out' [-Wunused-label] out: ^~~~ 1 warning generated. vim +/out +8398 drivers/scsi/ufs/ufshcd.c 57d104c153d3d6d Subhash Jadavani 2014-09-25 8335 57d104c153d3d6d Subhash Jadavani 2014-09-25 8336 /** 57d104c153d3d6d Subhash Jadavani 2014-09-25 8337 * ufshcd_set_dev_pwr_mode - sends START STOP UNIT command to set device 57d104c153d3d6d Subhash Jadavani 2014-09-25 8338 * power mode 57d104c153d3d6d Subhash Jadavani 2014-09-25 8339 * @hba: per adapter instance 57d104c153d3d6d Subhash Jadavani 2014-09-25 8340 * @pwr_mode: device power mode to set 57d104c153d3d6d Subhash Jadavani 2014-09-25 8341 * 57d104c153d3d6d Subhash Jadavani 2014-09-25 8342 * Returns 0 if requested power mode is set successfully 57d104c153d3d6d Subhash Jadavani 2014-09-25 8343 * Returns non-zero if failed to set the requested power mode 57d104c153d3d6d Subhash Jadavani 2014-09-25 8344 */ 57d104c153d3d6d Subhash Jadavani 2014-09-25 8345 static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba, 57d104c153d3d6d Subhash Jadavani 2014-09-25 8346 enum ufs_dev_pwr_mode pwr_mode) 57d104c153d3d6d Subhash Jadavani 2014-09-25 8347 { 57d104c153d3d6d Subhash Jadavani 2014-09-25 8348 unsigned char cmd[6] = { START_STOP }; 57d104c153d3d6d Subhash Jadavani 2014-09-25 8349 struct scsi_sense_hdr sshdr; 7c48bfd038e570c Akinobu Mita 2014-10-23 8350 struct scsi_device *sdp; 7c48bfd038e570c Akinobu Mita 2014-10-23 8351 unsigned long flags; 57d104c153d3d6d Subhash Jadavani 2014-09-25 8352 int ret; 57d104c153d3d6d Subhash Jadavani 2014-09-25 8353 7c48bfd038e570c Akinobu Mita 2014-10-23 8354 spin_lock_irqsave(hba->host->host_lock, flags); 7c48bfd038e570c Akinobu Mita 2014-10-23 8355 sdp = hba->sdev_ufs_device; 7c48bfd038e570c Akinobu Mita 2014-10-23 8356 if (sdp) { 7c48bfd038e570c Akinobu Mita 2014-10-23 8357 ret = scsi_device_get(sdp); 7c48bfd038e570c Akinobu Mita 2014-10-23 8358 if (!ret && !scsi_device_online(sdp)) { 7c48bfd038e570c Akinobu Mita 2014-10-23 8359 ret = -ENODEV; 7c48bfd038e570c Akinobu Mita 2014-10-23 8360 scsi_device_put(sdp); 7c48bfd038e570c Akinobu Mita 2014-10-23 8361 } 7c48bfd038e570c Akinobu Mita 2014-10-23 8362 } else { 7c48bfd038e570c Akinobu Mita 2014-10-23 8363 ret = -ENODEV; 7c48bfd038e570c Akinobu Mita 2014-10-23 8364 } 7c48bfd038e570c Akinobu Mita 2014-10-23 8365 spin_unlock_irqrestore(hba->host->host_lock, flags); 7c48bfd038e570c Akinobu Mita 2014-10-23 8366 7c48bfd038e570c Akinobu Mita 2014-10-23 8367 if (ret) 7c48bfd038e570c Akinobu Mita 2014-10-23 8368 return ret; 57d104c153d3d6d Subhash Jadavani 2014-09-25 8369 57d104c153d3d6d Subhash Jadavani 2014-09-25 8370 /* 57d104c153d3d6d Subhash Jadavani 2014-09-25 8371 * If scsi commands fail, the scsi mid-layer schedules scsi error- 57d104c153d3d6d Subhash Jadavani 2014-09-25 8372 * handling, which would wait for host to be resumed. Since we know 57d104c153d3d6d Subhash Jadavani 2014-09-25 8373 * we are functional while we are here, skip host resume in error 57d104c153d3d6d Subhash Jadavani 2014-09-25 8374 * handling context. 57d104c153d3d6d Subhash Jadavani 2014-09-25 8375 */ 57d104c153d3d6d Subhash Jadavani 2014-09-25 8376 hba->host->eh_noresume = 1; 0636adf2e888008 Randall Huang 2020-11-30 8377 ufshcd_clear_ua_wluns(hba); 57d104c153d3d6d Subhash Jadavani 2014-09-25 8378 57d104c153d3d6d Subhash Jadavani 2014-09-25 8379 cmd[4] = pwr_mode << 4; 57d104c153d3d6d Subhash Jadavani 2014-09-25 8380 57d104c153d3d6d Subhash Jadavani 2014-09-25 8381 /* 57d104c153d3d6d Subhash Jadavani 2014-09-25 8382 * Current function would be generally called from the power management e806402130c9c49 Christoph Hellwig 2016-10-20 8383 * callbacks hence set the RQF_PM flag so that it doesn't resume the 57d104c153d3d6d Subhash Jadavani 2014-09-25 8384 * already suspended childs. 57d104c153d3d6d Subhash Jadavani 2014-09-25 8385 */ fcbfffe2c5cbec0 Christoph Hellwig 2017-02-23 8386 ret = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr, fcbfffe2c5cbec0 Christoph Hellwig 2017-02-23 8387 START_STOP_TIMEOUT, 0, 0, RQF_PM, NULL); 57d104c153d3d6d Subhash Jadavani 2014-09-25 8388 if (ret) { 57d104c153d3d6d Subhash Jadavani 2014-09-25 8389 sdev_printk(KERN_WARNING, sdp, ef61329db7b8b43 Hannes Reinecke 2014-10-24 8390 "START_STOP failed for power mode: %d, result %x\n", ef61329db7b8b43 Hannes Reinecke 2014-10-24 8391 pwr_mode, ret); c65be1a63f1df22 Johannes Thumshirn 2018-06-25 8392 if (driver_byte(ret) == DRIVER_SENSE) 2104551969e8011 Hannes Reinecke 2015-01-08 8393 scsi_print_sense_hdr(sdp, NULL, &sshdr); 57d104c153d3d6d Subhash Jadavani 2014-09-25 8394 } 57d104c153d3d6d Subhash Jadavani 2014-09-25 8395 57d104c153d3d6d Subhash Jadavani 2014-09-25 8396 if (!ret) 57d104c153d3d6d Subhash Jadavani 2014-09-25 8397 hba->curr_dev_pwr_mode = pwr_mode; 57d104c153d3d6d Subhash Jadavani 2014-09-25 @8398 out: 7c48bfd038e570c Akinobu Mita 2014-10-23 8399 scsi_device_put(sdp); 57d104c153d3d6d Subhash Jadavani 2014-09-25 8400 hba->host->eh_noresume = 0; 57d104c153d3d6d Subhash Jadavani 2014-09-25 8401 return ret; 57d104c153d3d6d Subhash Jadavani 2014-09-25 8402 } 57d104c153d3d6d Subhash Jadavani 2014-09-25 8403 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip