linux/drivers/usb
Gustavo A. R. Silva 21a37aeda6 USB: musb: Replace zero-length array with flexible-array member
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertenly introduced[3] to the codebase from now on.

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 7649773293 ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Link: https://lore.kernel.org/r/20200211232519.GA23263@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-14 08:38:16 -08:00
..
atm USB: atm: Replace zero-length array with flexible-array member 2020-02-12 10:59:11 -08:00
c67x00
cdns3 usb: cdns3: remove redundant assignment to pointer trb 2020-02-10 11:15:27 -08:00
chipidea usb: chipidea: add inline for ci_hdrc_host_driver_init if host is not defined 2020-01-22 07:54:27 +01:00
class compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
common usb: common: usb-conn-gpio: Don't log an error on probe deferral 2019-12-10 11:41:20 +01:00
core usb: use kobj_to_dev() API 2020-02-14 08:38:15 -08:00
dwc2 usb: dwc2: Drop unlock/lock upon queueing a work item 2020-01-15 14:43:12 +01:00
dwc3 usb: dwc3: qcom: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-12 10:47:58 -08:00
early remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
gadget usb: gadget: remove redundant assignment to variable status 2020-02-10 11:15:27 -08:00
host usb: host: ehci-platform: add a quirk to avoid stuck 2020-02-10 11:15:27 -08:00
image Merge 5.4-rc3 into usb-next 2019-10-14 07:09:59 +02:00
isp1760 remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
misc USB: apple-mfi-fastcharge: fix endianess issue in probe 2020-02-13 05:07:10 -08:00
mon usb: mon: Fix a deadlock in usbmon between mmap and read 2019-12-10 11:41:20 +01:00
mtu3 Merge 5.4-rc6 into usb-next 2019-11-04 06:41:09 +01:00
musb USB: musb: Replace zero-length array with flexible-array member 2020-02-14 08:38:16 -08:00
phy usb: phy: show USB charger type for user 2020-01-24 09:41:27 +01:00
renesas_usbhs phy: for 5.6 2020-01-17 07:52:26 +01:00
roles usb: use kobj_to_dev() API 2020-02-14 08:38:15 -08:00
serial Here are the USB-serial updates for 5.6-rc1, including: 2020-01-27 10:21:22 +01:00
storage USB: Fix incorrect DMA allocations for local memory pool drivers 2019-12-11 09:06:41 +01:00
typec usb: typec: tcpm: set correct data role for non-DRD 2020-02-14 08:38:15 -08:00
usbip usbip: Fix error path of vhci_recv_ret_submit() 2019-12-17 16:36:33 +01:00
Kconfig
Makefile
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00