alistair23-linux/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 i2400m: debugfs return code is wrong 2012-10-25 18:01:38 +02:00
driver.c wimax/i2400m: make return of 0 explicit 2014-05-21 17:16:24 -04:00
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 wimax: Remove extern from function prototypes 2013-09-24 16:46:22 -07:00
Kconfig i2400m: remove SDIO device support 2012-07-11 15:40:22 -04:00
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 wimax/i2400m: use struct_size() helper 2019-05-04 00:04:31 -04:00
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 net: wimax: i2400m: usb-notif: don't print error when allocating urb fails 2016-08-13 14:53:40 -07:00
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