linux/drivers/misc/mei
Gustavo A. R. Silva 6736041f96 mei: bus: 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/20200211210822.GA31368@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 14:03:19 -08:00
..
hdcp mei: hdcp: bind only with i915 on the same PCH 2020-01-10 13:20:49 +01:00
bus-fixup.c mei: bus: replace zero-length array with flexible-array member 2020-02-11 14:03:19 -08:00
bus.c mei: bus: use simple sprintf for sysfs 2020-01-10 13:20:49 +01:00
client.c mei: expose device state in sysfs 2019-04-25 19:33:34 +02:00
client.h mei: bus: add more client attributes to sysfs 2019-11-16 12:58:54 +01:00
debugfs.c Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
dma-ring.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hbm.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hbm.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hw-me-regs.h mei: me: add jasper point DID 2020-01-24 09:33:58 +01:00
hw-me.c mei: add trc detection register to sysfs 2019-11-07 09:37:27 +01:00
hw-me.h mei: add trc detection register to sysfs 2019-11-07 09:37:27 +01:00
hw-txe-regs.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hw-txe.c mei: abstract fw status register read. 2019-11-07 09:35:49 +01:00
hw-txe.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
hw.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
init.c mei: abstract fw status register read. 2019-11-07 09:35:49 +01:00
interrupt.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
Kconfig mei: hdcp: use own Kconfig file 2019-04-25 19:33:34 +02:00
main.c compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
Makefile mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
mei_dev.h mei: add trc detection register to sysfs 2019-11-07 09:37:27 +01:00
mei-trace.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
mei-trace.h mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
pci-me.c mei: me: add jasper point DID 2020-01-24 09:33:58 +01:00
pci-txe.c mei: Use dev_get_drvdata where possible 2019-07-30 20:32:53 +02:00