public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Kiwoong Kim" <kwmad.kim@samsung.com>
To: "'Bart Van Assche'" <bvanassche@acm.org>,
	<linux-scsi@vger.kernel.org>, <sc.suh@samsung.com>,
	<hy50.seo@samsung.com>, <sh425.lee@samsung.com>,
	<bhoon95.kim@samsung.com>, <vkumar.1997@samsung.com>
Subject: RE: [PATCH v1] scsi: ufs: use an generic error code in ufshcd_set_dev_pwr_mode
Date: Fri, 21 Jan 2022 14:34:07 +0900	[thread overview]
Message-ID: <010f01d80e88$83c422c0$8b4c6840$@samsung.com> (raw)
In-Reply-To: <cbd41ae3-2b31-381a-6f07-58603a318961@acm.org>

> I think that scsi_execute() can return a negative value. From
> __scsi_execute():
> 
> 	req = scsi_alloc_request(sdev->request_queue,
> 			data_direction == DMA_TO_DEVICE ?
> 			REQ_OP_DRV_OUT : REQ_OP_DRV_IN,
> 			rq_flags & RQF_PM ? BLK_MQ_REQ_PM : 0);
> 	if (IS_ERR(req))
> 		return PTR_ERR(req);
> 
> As you probably know PTR_ERR() returns a negative error code if IS_ERR()
> returns true.

Right, Thanks.



      reply	other threads:[~2022-01-21  5:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220117103107epcas2p3d7223ff63f6cb575316695cc8fb155a4@epcas2p3.samsung.com>
2022-01-17 10:29 ` [PATCH v1] scsi: ufs: use an generic error code in ufshcd_set_dev_pwr_mode Kiwoong Kim
2022-01-19  0:45   ` Bart Van Assche
2022-01-20  2:51     ` Kiwoong Kim
2022-01-20 17:57       ` Bart Van Assche
2022-01-21  5:34         ` Kiwoong Kim [this message]

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='010f01d80e88$83c422c0$8b4c6840$@samsung.com' \
    --to=kwmad.kim@samsung.com \
    --cc=bhoon95.kim@samsung.com \
    --cc=bvanassche@acm.org \
    --cc=hy50.seo@samsung.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sc.suh@samsung.com \
    --cc=sh425.lee@samsung.com \
    --cc=vkumar.1997@samsung.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