All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: yuan linyu <cugyly@163.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] usb: core: message: remove memset in usb_get_descriptor()
Date: Sat, 29 Jun 2019 11:13:29 +0200	[thread overview]
Message-ID: <20190629091329.GC4198@kroah.com> (raw)
In-Reply-To: <20190629084011.8101-1-cugyly@163.com>

On Sat, Jun 29, 2019 at 04:40:11PM +0800, yuan linyu wrote:
> when below condition occur, the buf will be dirty again.
> if (result > 1 && ((u8 *)buf)[1] != type) {
> 	result = -ENODATA;
> 	continue;
> }
> so caller should check return length which indicate buffer valid or not.

I still fail to see what this means at all.

A changelog comment should explain what the problem is and why it is
being fixed in this way.

> 
> Signed-off-by: yuan linyu <cugyly@163.com>
> ---
>  drivers/usb/core/message.c | 2 --
>  1 file changed, 2 deletions(-)

Also you need to put what changed from a previous patch below the ---
line like the documentation states to do.

thanks,

greg k-h

      reply	other threads:[~2019-06-29  9:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29  8:40 [PATCH v2] usb: core: message: remove memset in usb_get_descriptor() yuan linyu
2019-06-29  9:13 ` Greg KH [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=20190629091329.GC4198@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=cugyly@163.com \
    --cc=linux-usb@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.