linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	kernel-team@android.com
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	cang@codeaurora.org, alim.akhtar@samsung.com,
	avri.altman@wdc.com, bvanassche@acm.org,
	martin.petersen@oracle.com, stanley.chu@mediatek.com,
	Randall Huang <huangrandall@google.com>
Subject: Re: [PATCH] scsi: ufs: clear uac for RPMB after ufshcd resets
Date: Tue, 1 Dec 2020 15:39:39 +0800	[thread overview]
Message-ID: <202012011503.LfVGheuV-lkp@intel.com> (raw)
In-Reply-To: <20201201041402.3860525-1-jaegeuk@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 7411 bytes --]

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@intel.com>

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30227 bytes --]

  reply	other threads:[~2020-12-01  7:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  4:14 [PATCH] scsi: ufs: clear uac for RPMB after ufshcd resets Jaegeuk Kim
2020-12-01  7:39 ` kernel test robot [this message]
2020-12-08 21:51 ` [PATCH v2] " Jaegeuk Kim
2020-12-09  1:06   ` Stanley Chu
2020-12-09  2:36   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202012011503.LfVGheuV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=huangrandall@google.com \
    --cc=jaegeuk@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).