linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: jongmin jeong <jjmin.jeong@samsung.com>,
	jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: kbuild-all@lists.01.org, alim.akhtar@samsung.com,
	avri.altman@wdc.com, cang@codeaurora.org, beanhuo@micron.com,
	adrian.hunter@intel.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, jjmin.jeong@samsung.com
Subject: Re: [PATCH 3/3] scsi: ufs: add quirk to support host reset only
Date: Thu, 27 May 2021 14:08:10 +0800	[thread overview]
Message-ID: <202105271312.sXksfSiS-lkp@intel.com> (raw)
In-Reply-To: <20210527030901.88403-4-jjmin.jeong@samsung.com>

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

Hi jongmin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next v5.13-rc3 next-20210526]
[cannot apply to target/for-next]
[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/jongmin-jeong/scsi-ufs-add-quirk-to-handle-broken-UIC-command/20210527-120913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-r035-20210526 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/1418a728f0fcd3a50e41d3314d8d9e1ec672a0c7
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review jongmin-jeong/scsi-ufs-add-quirk-to-handle-broken-UIC-command/20210527-120913
        git checkout 1418a728f0fcd3a50e41d3314d8d9e1ec672a0c7
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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: In function 'ufshcd_eh_device_reset_handler':
>> drivers/scsi/ufs/ufshcd.c:6827:9: warning: 'hba' is used uninitialized in this function [-Wuninitialized]
    6827 |  if (hba->quirks & UFSHCD_QUIRK_BROKEN_RESET_HANDLER)
         |      ~~~^~~~~~~~


vim +/hba +6827 drivers/scsi/ufs/ufshcd.c

  6810	
  6811	/**
  6812	 * ufshcd_eh_device_reset_handler - device reset handler registered to
  6813	 *                                    scsi layer.
  6814	 * @cmd: SCSI command pointer
  6815	 *
  6816	 * Returns SUCCESS/FAILED
  6817	 */
  6818	static int ufshcd_eh_device_reset_handler(struct scsi_cmnd *cmd)
  6819	{
  6820		struct Scsi_Host *host;
  6821		struct ufs_hba *hba;
  6822		u32 pos;
  6823		int err;
  6824		u8 resp = 0xF, lun;
  6825		unsigned long flags;
  6826	
> 6827		if (hba->quirks & UFSHCD_QUIRK_BROKEN_RESET_HANDLER)
  6828			return ufshcd_eh_host_reset_handler(cmd);
  6829	
  6830		host = cmd->device->host;
  6831		hba = shost_priv(host);
  6832	
  6833		lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun);
  6834		err = ufshcd_issue_tm_cmd(hba, lun, 0, UFS_LOGICAL_RESET, &resp);
  6835		if (err || resp != UPIU_TASK_MANAGEMENT_FUNC_COMPL) {
  6836			if (!err)
  6837				err = resp;
  6838			goto out;
  6839		}
  6840	
  6841		/* clear the commands that were pending for corresponding LUN */
  6842		for_each_set_bit(pos, &hba->outstanding_reqs, hba->nutrs) {
  6843			if (hba->lrb[pos].lun == lun) {
  6844				err = ufshcd_clear_cmd(hba, pos);
  6845				if (err)
  6846					break;
  6847			}
  6848		}
  6849		spin_lock_irqsave(host->host_lock, flags);
  6850		ufshcd_transfer_req_compl(hba);
  6851		spin_unlock_irqrestore(host->host_lock, flags);
  6852	
  6853	out:
  6854		hba->req_abort_count = 0;
  6855		ufshcd_update_evt_hist(hba, UFS_EVT_DEV_RESET, (u32)err);
  6856		if (!err) {
  6857			err = SUCCESS;
  6858		} else {
  6859			dev_err(hba->dev, "%s: failed with err %d\n", __func__, err);
  6860			err = FAILED;
  6861		}
  6862		return err;
  6863	}
  6864	

---
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: 39113 bytes --]

  reply	other threads:[~2021-05-27  6:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210527031217epcas2p44b9d999edcc55b345dfd0749acefeaec@epcas2p4.samsung.com>
2021-05-27  3:08 ` [PATCH 0/3] Add quirk to support exynos ufshci jongmin jeong
     [not found]   ` <CGME20210527031219epcas2p313fcf248833cf14ec9a164dd91a1ca13@epcas2p3.samsung.com>
2021-05-27  3:08     ` [PATCH 1/3] scsi: ufs: add quirk to handle broken UIC command jongmin jeong
2021-05-27  8:00       ` Christoph Hellwig
2021-06-03  3:08         ` 정종민
     [not found]   ` <CGME20210527031220epcas2p269503cfa517d80af350c5344cdeb24c7@epcas2p2.samsung.com>
2021-05-27  3:09     ` [PATCH 2/3] scsi: ufs: add quirk to enable host controller without interface configuration jongmin jeong
     [not found]   ` <CGME20210527031220epcas2p41a5ba641919769ca95ccea81e5f3bfb0@epcas2p4.samsung.com>
2021-05-27  3:09     ` [PATCH 3/3] scsi: ufs: add quirk to support host reset only jongmin jeong
2021-05-27  6:08       ` kernel test robot [this message]
2021-05-27  6:31       ` Can Guo
2021-05-27  6:53       ` Can Guo
2021-06-03  3:21         ` 정종민
2021-05-27  7:34       ` kernel test robot
2021-05-27  8:17   ` [PATCH 0/3] Add quirk to support exynos ufshci Alim Akhtar
2021-05-27 16:40   ` Bart Van Assche

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=202105271312.sXksfSiS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=cang@codeaurora.org \
    --cc=jejb@linux.ibm.com \
    --cc=jjmin.jeong@samsung.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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).