linux/drivers/net/ethernet/broadcom/bnx2x
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_cmn.c bnx2x: Utilize firmware 7.13.21.0 2021-12-20 11:29:20 +00:00
bnx2x_cmn.h net: remove napi_hash_del() from driver-facing API 2020-09-10 13:08:46 -07:00
bnx2x_dcb.c bnx2x: Remove Comparison to bool in bnx2x_dcb.c 2020-05-05 11:39:42 -07:00
bnx2x_dcb.h
bnx2x_dump.h
bnx2x_ethtool.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
bnx2x_fw_defs.h bnx2x: Utilize firmware 7.13.21.0 2021-12-20 11:29:20 +00:00
bnx2x_fw_file_hdr.h
bnx2x_hsi.h bnx2x: Utilize firmware 7.13.21.0 2021-12-20 11:29:20 +00:00
bnx2x_init_ops.h net: bnx2x: fix variable dereferenced before check 2021-11-15 13:28:49 +00:00
bnx2x_init.h ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use 2020-01-31 10:30:36 -08:00
bnx2x_link.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
bnx2x_link.h bnx2x: Remove format_fw_ver_t function casts 2019-11-16 12:50:57 -08:00
bnx2x_main.c bnx2x: Remove useless DMA-32 fallback configuration 2022-01-09 16:52:19 -08:00
bnx2x_mfw_req.h
bnx2x_reg.h net/ethernet/broadcom: fix spelling typo 2020-09-24 20:05:48 -07:00
bnx2x_self_test.c bnx2x: fix spelling mistake "occurd" -> "occurred" 2020-07-07 15:41:54 -07:00
bnx2x_sp.c net: broadcom: bnx2x: Fix wrong function name in comments 2021-05-17 14:12:38 -07:00
bnx2x_sp.h bnx2x: Fix accounting of vlan resources among the PFs 2019-12-26 15:27:14 -08:00
bnx2x_sriov.c bnx2x: Invalidate fastpath HSI version for VFs 2021-12-20 11:29:20 +00:00
bnx2x_sriov.h bnx2x: constify static inline stub for dev_addr 2021-11-20 12:25:56 +00:00
bnx2x_stats.c bnx2x: Use struct_group() for memcpy() region 2021-11-19 11:18:08 +00:00
bnx2x_stats.h bnx2x: Use struct_group() for memcpy() region 2021-11-19 11:18:08 +00:00
bnx2x_vfpf.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
bnx2x_vfpf.h
bnx2x.h bnx2x: Replace one-element array with flexible-array member 2022-02-05 15:28:10 +00:00
Makefile bnx2x: Add support for idlechk tests. 2020-07-04 17:51:07 -07:00