From: Bart Van Assche <bvanassche@acm.org>
To: Chanwoo Lee <cw9316.lee@samsung.com>,
alim.akhtar@samsung.com, avri.altman@wdc.com,
James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com, peter.wang@mediatek.com,
beanhuo@micron.com, can.guo@oss.qualcomm.com,
adrian.hunter@intel.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: ufs: Fix wrong value printed in unexpected UPIU response case
Date: Wed, 27 May 2026 09:08:19 -0700 [thread overview]
Message-ID: <c1a6167c-6dd3-4274-943b-90bb9f79d6e8@acm.org> (raw)
In-Reply-To: <20260527092134.275887-1-cw9316.lee@samsung.com>
On 5/27/26 2:21 AM, Chanwoo Lee wrote:
> In ufshcd_transfer_rsp_status(), the default case of the inner switch
> statement prints the UPIU response code when an unexpected response is
> received. However, the code was printing 'result' variable which is
> always 0 at that point, making the error message useless for debugging.
>
> Fix this by printing the actual UPIU response code returned by
> ufshcd_get_req_rsp().
>
> Fixes: 08108d31129a ("scsi: ufs: Improve type safety")
> Signed-off-by: Chanwoo Lee <cw9316.lee@samsung.com>
> ---
> drivers/ufs/core/ufshcd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 0371dea44887..d8f309db967e 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5706,7 +5706,7 @@ static inline int ufshcd_transfer_rsp_status(struct ufs_hba *hba,
> default:
> dev_err(hba->dev,
> "Unexpected request response code = %x\n",
> - result);
> + ufshcd_get_req_rsp(lrbp->ucd_rsp_ptr));
> result = DID_ERROR << 16;
> break;
> }
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
next prev parent reply other threads:[~2026-05-27 16:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260527092151epcas1p125118deafc1caad64c4c2c9620124969@epcas1p1.samsung.com>
2026-05-27 9:21 ` Chanwoo Lee
2026-05-27 16:08 ` Bart Van Assche [this message]
2026-06-02 1:59 ` Martin K. Petersen
2026-06-09 1:38 ` 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=c1a6167c-6dd3-4274-943b-90bb9f79d6e8@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=can.guo@oss.qualcomm.com \
--cc=cw9316.lee@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@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
all inboxes | Powered by JetHome®