* [PATCH] USB: usbfs: remove double evaluation of usb_sndctrlpipe()
@ 2021-05-21 12:58 Geoffrey D. Bennett
2021-05-21 13:17 ` Greg KH
2021-05-21 14:39 ` Alan Stern
0 siblings, 2 replies; 3+ messages in thread
From: Geoffrey D. Bennett @ 2021-05-21 12:58 UTC (permalink / raw)
To: USB mailing list, Alan Stern; +Cc: Geoffrey D. Bennett
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);
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] USB: usbfs: remove double evaluation of usb_sndctrlpipe()
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
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2021-05-21 13:17 UTC (permalink / raw)
To: Geoffrey D. Bennett; +Cc: USB mailing list, Alan Stern
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")
There is no bug here to "fix" this is just a cleanup.
Can you drop this and then properly cc: the needed developers when you
resend a v2?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] USB: usbfs: remove double evaluation of usb_sndctrlpipe()
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
1 sibling, 0 replies; 3+ messages in thread
From: Alan Stern @ 2021-05-21 14:39 UTC (permalink / raw)
To: Geoffrey D. Bennett; +Cc: USB mailing list
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-21 14:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.