linux_dsm_epyc7002/drivers/net/wimax/i2400m
Gustavo A. R. Silva 13644be211 wimax/i2400m: use struct_size() helper
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
    int stuff;
    void *entry[];
};

size = sizeof(struct foo) + count * sizeof(void *);
instance = alloc(size, GFP_KERNEL);

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

size = struct_size(instance, entry, count);

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-08 22:57:28 -08:00
..
control.c wimax/i2400m: fix spelling mistake "not unitialized" -> "uninitialized" 2018-09-26 20:09:58 -07:00
debug-levels.h
debugfs.c
driver.c
fw.c wimax/i2400m: remove redundant variables ack_status, bcf and protocol 2018-07-11 22:54:25 -07:00
i2400m-usb.h drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison 2017-05-09 09:40:33 -04:00
i2400m.h
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netdev.c wimax/i2400m: remove redundant variables ack_status, bcf and protocol 2018-07-11 22:54:25 -07:00
op-rfkill.c
rx.c wimax/i2400m: use struct_size() helper 2019-02-08 22:57:28 -08:00
sysfs.c treewide: Use DEVICE_ATTR_WO 2018-01-09 16:34:35 +01:00
tx.c
usb-debug-levels.h
usb-fw.c wimax: usb-fw: mark expected switch fall-through 2018-08-11 11:29:36 -07:00
usb-notif.c
usb-rx.c net: drivers/net: Remove unnecessary skb_copy_expand OOM messages 2018-03-15 14:28:03 -04:00
usb-tx.c wimax: usb-tx: mark expected switch fall-through 2018-08-11 11:29:36 -07:00
usb.c net: wimax/i2400m: mark expected switch fall-through 2019-02-08 11:56:32 -08:00