mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Bean Huo (beanhuo)" <beanhuo@micron.com>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"pedrom.sousa@synopsys.com" <pedrom.sousa@synopsys.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
	"tomas.winkler@intel.com" <tomas.winkler@intel.com>,
	"cang@codeaurora.org" <cang@codeaurora.org>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND PATCH v1 1/2] scsi: ufs: print helpful hint when response size exceed buffer size
Date: Tue, 12 Nov 2019 08:40:38 -0800	[thread overview]
Message-ID: <df3c0dc2-4ee6-1927-27b6-723d4e721ac5@acm.org> (raw)
In-Reply-To: <BN7PR08MB5684BF6841527EB11A207F56DB770@BN7PR08MB5684.namprd08.prod.outlook.com>

On 11/11/19 4:21 PM, Bean Huo (beanhuo) wrote:
> 
> Bean Huo <beanhuo@micron.com>
> 
> Reset since ver.kernel.org rejected outlook.com.
> Print out returned response size and buffer size, while the front one
> is bigger than the back one.
> 
> Signed-off-by: Bean Huo <beanhuo@micron.com>
> ---
>   drivers/scsi/ufs/ufshcd.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 11a87f51c442..fdb4f5b7f4bd 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -1935,8 +1935,8 @@ int ufshcd_copy_query_response(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
>   			memcpy(hba->dev_cmd.query.descriptor, descp, resp_len);
>   		} else {
>   			dev_warn(hba->dev,
> -				"%s: Response size is bigger than buffer",
> -				__func__);
> +				 "%s: rsp size %d is bigger than buffer size %d",
> +				 __func__, resp_len, buf_len);
>   			return -EINVAL;
>   		}
>   	}
> @@ -5856,7 +5856,9 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba,
>   			memcpy(desc_buff, descp, resp_len);
>   			*buff_len = resp_len;
>   		} else {
> -			dev_warn(hba->dev, "rsp size is bigger than buffer");
> +			dev_warn(hba->dev,
> +				 "%s: rsp size %d is bigger than buffer size %d",
> +				 __func__, resp_len, *buff_len);
>   			*buff_len = 0;
>   			err = -EINVAL;
>   		}

Hi Bean,

Please use git format-patch and/or git send-email to publish patches 
such that the standard format is used ("From: " is missing from the 
first line). Anyway:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>



      reply	other threads:[~2019-11-12 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12  0:21 Bean Huo (beanhuo)
2019-11-12 16:40 ` Bart Van Assche [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=df3c0dc2-4ee6-1927-27b6-723d4e721ac5@acm.org \
    --to=bvanassche@acm.org \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=cang@codeaurora.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=pedrom.sousa@synopsys.com \
    --cc=stanley.chu@mediatek.com \
    --cc=tomas.winkler@intel.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®