Minghao Chi (CGEL ZTE) d8c2858181 net/switchdev: use struct_size over open coded arithmetic
Replace zero-length array with flexible-array member and make use
of the struct_size() helper in kmalloc(). For example:

struct switchdev_deferred_item {
    ...
    unsigned long data[];
};

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-02-10 15:37:47 +00:00
..
2022-01-22 08:33:37 +02:00
2022-02-07 12:06:54 +00:00
2022-01-27 13:53:27 +00:00
2022-01-19 11:15:19 +02:00