* [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings
@ 2025-02-04 2:10 Gustavo A. R. Silva
2025-02-04 6:16 ` Michal Swiatkowski
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2025-02-04 2:10 UTC (permalink / raw)
To: Igor Russkikh, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Gustavo A. R. Silva, linux-hardening
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Remove unused flexible-array member `buf` and, with this, fix the following
warnings:
drivers/net/ethernet/aquantia/atlantic/aq_hw.h:197:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_hw.h:197:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
Suggested-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
Changes in v2:
- Remove unused flex-array member. (Igor)
v1:
- Link: https://lore.kernel.org/linux-hardening/ZrDwoVKH8d6TdVxn@cute/
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
index f5901f8e3907..f6b990b7f5b4 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
@@ -226,7 +226,6 @@ struct __packed offload_info {
struct offload_port_info ports;
struct offload_ka_info kas;
struct offload_rr_info rrs;
- u8 buf[];
};
struct __packed hw_atl_utils_fw_rpc {
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings
2025-02-04 2:10 [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
@ 2025-02-04 6:16 ` Michal Swiatkowski
2025-02-04 13:42 ` Simon Horman
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Michal Swiatkowski @ 2025-02-04 6:16 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Igor Russkikh, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
linux-hardening
On Tue, Feb 04, 2025 at 12:40:49PM +1030, Gustavo A. R. Silva wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
>
> Remove unused flexible-array member `buf` and, with this, fix the following
> warnings:
> drivers/net/ethernet/aquantia/atlantic/aq_hw.h:197:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_hw.h:197:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
>
> Suggested-by: Igor Russkikh <irusskikh@marvell.com>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> Changes in v2:
> - Remove unused flex-array member. (Igor)
>
> v1:
> - Link: https://lore.kernel.org/linux-hardening/ZrDwoVKH8d6TdVxn@cute/
>
> drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
> index f5901f8e3907..f6b990b7f5b4 100644
> --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
> +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h
> @@ -226,7 +226,6 @@ struct __packed offload_info {
> struct offload_port_info ports;
> struct offload_ka_info kas;
> struct offload_rr_info rrs;
> - u8 buf[];
> };
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>
> struct __packed hw_atl_utils_fw_rpc {
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings
2025-02-04 2:10 [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2025-02-04 6:16 ` Michal Swiatkowski
@ 2025-02-04 13:42 ` Simon Horman
2025-02-04 13:45 ` Igor Russkikh
2025-02-05 2:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2025-02-04 13:42 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Igor Russkikh, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
linux-hardening
On Tue, Feb 04, 2025 at 12:40:49PM +1030, Gustavo A. R. Silva wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
>
> Remove unused flexible-array member `buf` and, with this, fix the following
> warnings:
> drivers/net/ethernet/aquantia/atlantic/aq_hw.h:197:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_hw.h:197:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
>
> Suggested-by: Igor Russkikh <irusskikh@marvell.com>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> Changes in v2:
> - Remove unused flex-array member. (Igor)
>
> v1:
> - Link: https://lore.kernel.org/linux-hardening/ZrDwoVKH8d6TdVxn@cute/
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings
2025-02-04 2:10 [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2025-02-04 6:16 ` Michal Swiatkowski
2025-02-04 13:42 ` Simon Horman
@ 2025-02-04 13:45 ` Igor Russkikh
2025-02-05 2:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Igor Russkikh @ 2025-02-04 13:45 UTC (permalink / raw)
To: Gustavo A. R. Silva, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Remove unused flexible-array member `buf` and, with this, fix the following warnings: drivers/net/ethernet/aquantia/atlantic/aq_hw. h: 197: 36:
> Remove unused flexible-array member `buf` and, with this, fix the following
Thanks, Gustavo, for posting this.
Reviewed-by: Igor Russkikh <irusskikh@marvell.com>
Igor
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings
2025-02-04 2:10 [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
` (2 preceding siblings ...)
2025-02-04 13:45 ` Igor Russkikh
@ 2025-02-05 2:20 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-05 2:20 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: irusskikh, andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
linux-kernel, linux-hardening
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 4 Feb 2025 12:40:49 +1030 you wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
>
> Remove unused flexible-array member `buf` and, with this, fix the following
> warnings:
> drivers/net/ethernet/aquantia/atlantic/aq_hw.h:197:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_hw.h:197:36: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
>
> [...]
Here is the summary with links:
- [v2,next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings
https://git.kernel.org/netdev/net-next/c/33b565fa2bc0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-05 2:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 2:10 [PATCH v2][next] net: atlantic: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2025-02-04 6:16 ` Michal Swiatkowski
2025-02-04 13:42 ` Simon Horman
2025-02-04 13:45 ` Igor Russkikh
2025-02-05 2:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).