tmp_suning_uos_patched/drivers/net/wimax/i2400m
Gustavo A. R. Silva 70bb13a5ff wimax/i2400m: 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, replace code of the following form:

sizeof(*tx_msg) + le16_to_cpu(tx_msg->num_pls) * sizeof(tx_msg->pld[0]);

with:

struct_size(tx_msg, pld, le16_to_cpu(tx_msg->num_pls));

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-05-04 00:04:31 -04:00
..
control.c wimax/i2400m/control: Mark expected switch fall-through 2019-04-26 11:28:47 -04:00
debug-levels.h
debugfs.c
driver.c
fw.c
i2400m-usb.h
i2400m.h
Kconfig
Makefile
netdev.c
op-rfkill.c
rx.c
sysfs.c
tx.c wimax/i2400m: use struct_size() helper 2019-05-04 00:04:31 -04:00
usb-debug-levels.h
usb-fw.c
usb-notif.c
usb-rx.c
usb-tx.c
usb.c