linux-stable/drivers/usb/usbip
Shuah Khan dd65a243a9 usb/usbip: Fix v_recv_cmd_submit() to use PIPE_BULK define
Fix v_recv_cmd_submit() to use PIPE_BULK define instead of hard coded
values. This also fixes the following signed integer overflow error
reported by cppcheck. This is not an issue since pipe is unsigned int.
However, this change improves the code to use proper define.

drivers/usb/usbip/vudc_rx.c:152:26: error: Signed integer overflow for expression '3<<30'. [integerOverflow]
 urb_p->urb->pipe &= ~(3 << 30);

In addition, add a build time check for PIPE_BULK != 3 as the code path
depends on PIPE_BULK = 3.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20221110194738.38514-1-skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-11 10:28:42 +01:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
stub.h
stub_dev.c USB: usbip: missing lock in stub down 2022-10-22 13:22:25 +02:00
stub_main.c usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
stub_rx.c usbip: add USBIP_URB_* URB transfer flags 2022-08-31 09:07:53 +02:00
stub_tx.c
usbip_common.c usbip: add USBIP_URB_* URB transfer flags 2022-08-31 09:07:53 +02:00
usbip_common.h Linux 5.12-rc8 2021-04-20 10:13:58 +02:00
usbip_event.c usb: Remove redundant 'flush_workqueue()' calls 2021-11-17 14:36:57 +01:00
vhci.h
vhci_hcd.c usbip:vhci_hcd USB port can get stuck in the disabled state 2021-08-26 13:29:27 +02:00
vhci_rx.c kcov, usbip: collect coverage from vhci_rx_loop 2020-12-28 15:48:36 +01:00
vhci_sysfs.c usbip: add sysfs_lock to synchronize sysfs code paths 2021-04-05 09:05:42 +02:00
vhci_tx.c usbip: Fix free of unallocated memory in vhci tx 2019-10-28 17:51:06 +01:00
vudc.h
vudc_dev.c usbip: vudc synchronize sysfs code paths 2021-04-05 09:05:42 +02:00
vudc_main.c usb: usbip: eliminate anonymous module_init & module_exit 2022-03-18 12:52:56 +01:00
vudc_rx.c usb/usbip: Fix v_recv_cmd_submit() to use PIPE_BULK define 2022-11-11 10:28:42 +01:00
vudc_sysfs.c usbip: vudc: Convert snprintf() to sysfs_emit() 2022-10-22 13:20:49 +02:00
vudc_transfer.c usbip: Use fallthrough pseudo-keyword 2020-07-09 18:06:35 +02:00
vudc_tx.c