mlxfw: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
Subsystems (3)
PATCH 1/1 mlxfw: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations alone in structs with the new DECLARE_FLEX_ARRAY() helper macro.
This helper allows for flexible-array members alone in structs.
--- drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2_format.h +1 -1
@@ -44,7 +44,7 @@ MLXFW_MFA2_TLV(multi, struct mlxfw_mfa2_tlv_multi, MLXFW_MFA2_TLV_MULTI_PART);struct mlxfw_mfa2_tlv_psid { -u8 psid[0 ]; + DECLARE_FLEX_ARRAY(u8, psid); } __packed; MLXFW_MFA2_TLV_VARSIZE(psid, struct mlxfw_mfa2_tlv_psid,
Signature · 1 line
2.34.1
Quoted 11 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations alone in structs with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members alone in structs.
Quoted 11 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations alone in structs with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members alone in structs.
Signature · 1 line
Kees Cook
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 15 May 2023 13:22:48 -0600 you wrote:
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations alone in structs with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members alone in structs.
[...]
Here is the summary with links:
- [next] mlxfw: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
https://git.kernel.org/netdev/net-next/c/b1cf7a561515
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html