linux_dsm_epyc7002/drivers/usb
Gustavo A. R. Silva 01bdf01c7b usb: wusbcore: wa-xfer: use struct_size() helper
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, change the following form:

sizeof(*packet_desc) + (sizeof(packet_desc->PacketLength[0]) * seg->isoc_frame_count)

to :

struct_size(packet_status, PacketStatus, seg->isoc_frame_count);

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19 14:41:38 +01:00
..
atm USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
c67x00 USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
chipidea Merge 5.0-rc4 into usb-next 2019-01-28 08:44:58 +01:00
class USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
common usb: roles: Add a description for the class to Kconfig 2018-12-17 14:07:59 +01:00
core usb: core: config: Use struct_size() in kzalloc() 2019-02-19 14:41:38 +01:00
dwc2 usb: dwc2: use struct_size() in kzalloc() 2019-02-19 14:41:38 +01:00
dwc3 USB: changes for v5.1 merge window 2019-02-15 09:08:57 +01:00
early drivers: usb: early: clean up indentation, remove extraneous tabs 2018-11-23 16:13:14 +01:00
gadget USB: changes for v5.1 merge window 2019-02-15 09:08:57 +01:00
host usb: host: oxu210hp-hcd: fix indentation issue 2019-02-12 10:30:48 +01:00
image USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
isp1760 USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
misc USB: changes for v5.1 merge window 2019-02-15 09:08:57 +01:00
mon USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
mtu3 USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
musb USB: musb: mark expected switch fall-through 2019-02-13 19:40:20 +01:00
phy USB: changes for v5.1 merge window 2019-02-15 09:08:57 +01:00
renesas_usbhs usb: renesas_usbhs: replace udelay() with usleep_range() 2019-01-28 12:51:29 +02:00
roles usb: roles: Find the muxes by also matching against the device node 2019-02-14 10:52:25 +01:00
serial Merge 5.0-rc4 into usb-next 2019-01-28 08:44:58 +01:00
storage USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
typec usb: typec: mux: Fix unsigned comparison with less than zero 2019-02-19 14:26:45 +01:00
usbip usbip: Fix vep_free_request() null pointer checks on input args 2019-01-30 09:22:35 +01:00
wusbcore usb: wusbcore: wa-xfer: use struct_size() helper 2019-02-19 14:41:38 +01:00
Kconfig USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
Makefile usb: roles: Add Intel xHCI USB role switch driver 2018-03-22 13:49:27 +01:00
usb-skeleton.c usb: usb-skeleton: use irqsave() in USB's complete callback 2018-06-28 19:36:06 +09:00