USB: usbfs: remove double evaluation of usb_sndctrlpipe()
PATCH 1/1 USB: usbfs: remove double evaluation of usb_sndctrlpipe()
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().
--- drivers/usb/core/devio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/core/devio.c +1 -1
@@ -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);
Signature · 1 line
2.31.1
Greg KH
maintainerQuoted 5 lines · Geoffrey D. Bennett
usb_sndctrlpipe()is evaluated indo_proc_control(), saved in a variable, then evaluated again. Use the saved variable instead, to match the use ofusb_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
Quoted 15 lines · Geoffrey D. Bennett
usb_sndctrlpipe()is evaluated indo_proc_control(), saved in a variable, then evaluated again. Use the saved variable instead, to match the use ofusb_rcvctrlpipe().Fixes 4c6e8971cbe0 ("USB: make the "usbfs_snoop" log more pertinent")Signed-off-by Geoffrey D. Bennett <[email protected]>--- drivers/usb/core/devio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/core/devio.c +0
-0
drivers/usb/core/devio.c static int do_proc_control(struct usb_dev_state *ps, · line 1168
Quoted 8 lines
drivers/usb/core/devio.c +1
-1@@ -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:
Alan Stern