public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: "Geoffrey D. Bennett" <g@b4.vu>
Cc: USB mailing list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] USB: usbfs: remove double evaluation of usb_sndctrlpipe()
Date: Fri, 21 May 2021 10:39:29 -0400	[thread overview]
Message-ID: <20210521143929.GC1239965@rowland.harvard.edu> (raw)
In-Reply-To: <20210521125856.116349-1-g@b4.vu>

On Fri, May 21, 2021 at 10:28:56PM +0930, Geoffrey D. Bennett wrote:
> usb_sndctrlpipe() is evaluated in do_proc_control(), saved in a
> variable, then evaluated again. Use the saved variable instead, to
> match the use of usb_rcvctrlpipe().
> 
> Fixes: 4c6e8971cbe0 ("USB: make the "usbfs_snoop" log more pertinent")
> Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
> ---
>  drivers/usb/core/devio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
> index 533236366a03..4a8ec136460c 100644
> --- a/drivers/usb/core/devio.c
> +++ b/drivers/usb/core/devio.c
> @@ -1162,7 +1162,7 @@ static int do_proc_control(struct usb_dev_state *ps,
>  			tbuf, ctrl->wLength);
>  
>  		usb_unlock_device(dev);
> -		i = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ctrl->bRequest,
> +		i = usb_control_msg(dev, pipe, ctrl->bRequest,
>  				    ctrl->bRequestType, ctrl->wValue, ctrl->wIndex,
>  				    tbuf, ctrl->wLength, tmo);
>  		usb_lock_device(dev);

When you resubmit without the Fixes: tag, you can add:

Acked-by: Alan Stern <stern@rowland.harvard.edu>

Alan Stern

      parent reply	other threads:[~2021-05-21 14:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 12:58 [PATCH] USB: usbfs: remove double evaluation of usb_sndctrlpipe() Geoffrey D. Bennett
2021-05-21 13:17 ` Greg KH
2021-05-21 14:39 ` Alan Stern [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=20210521143929.GC1239965@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=g@b4.vu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox