linux/drivers/net/ethernet/broadcom
Gustavo A. R. Silva 76ad950c8f bnx2x: Replace one-element array with flexible-array member
There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().

This issue was found with the help of Coccinelle and audited and fixed,
manually.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/79
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-02-05 15:28:10 +00:00
..
bnx2x bnx2x: Replace one-element array with flexible-array member 2022-02-05 15:28:10 +00:00
bnxt bnxt: report header-data split state 2022-01-28 14:43:48 +00:00
genet net: use bool values to pass bool param of phy_init_eee() 2022-01-24 17:09:56 -08:00
b44.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
b44.h
bcm63xx_enet.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
bcm63xx_enet.h
bcm4908_enet.c net: broadcom: bcm4908enet: remove redundant variable bytes 2021-12-22 14:58:43 -08:00
bcm4908_enet.h
bcmsysport.c net: systemport: Add global locking for descriptor lifecycle 2021-12-16 08:15:31 -08:00
bcmsysport.h net: systemport: Add global locking for descriptor lifecycle 2021-12-16 08:15:31 -08:00
bgmac-bcma-mdio.c net: bgmac: support MDIO described in DT 2021-10-05 11:38:37 +01:00
bgmac-bcma.c ethernet: use of_get_ethdev_address() 2021-10-07 13:39:51 +01:00
bgmac-platform.c ethernet: use of_get_ethdev_address() 2021-10-07 13:39:51 +01:00
bgmac.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
bgmac.h
bnx2.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
bnx2.h
bnx2_fw.h
cnic.c
cnic.h
cnic_defs.h
cnic_if.h
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile
sb1250-mac.c ethernet: broadcom/sb1250-mac: don't write directly to netdev->dev_addr 2022-01-26 15:40:01 +00:00
tg3.c net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
tg3.h tg3: Read VPD with pci_vpd_alloc() 2021-08-20 15:49:00 -05:00
unimac.h