* [PATCH][next] geneve: Avoid -Wflex-array-member-not-at-end warning
@ 2025-09-09 15:42 Gustavo A. R. Silva
2025-09-09 16:15 ` Andrew Lunn
2025-09-12 2:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2025-09-09 15:42 UTC (permalink / raw)
To: 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.
Move the conflicting declaration to the end of the corresponding
structure. Notice that `struct ip_tunnel_info` is a flexible
structure, this is a structure that contains a flexible-array
member.
Fix the following warning:
drivers/net/geneve.c:56:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
drivers/net/geneve.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 54384f9b3872..77b0c3d52041 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -53,7 +53,6 @@ struct geneve_dev_node {
};
struct geneve_config {
- struct ip_tunnel_info info;
bool collect_md;
bool use_udp6_rx_checksums;
bool ttl_inherit;
@@ -61,6 +60,9 @@ struct geneve_config {
bool inner_proto_inherit;
u16 port_min;
u16 port_max;
+
+ /* Must be last --ends in a flexible-array member. */
+ struct ip_tunnel_info info;
};
/* Pseudo network device */
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH][next] geneve: Avoid -Wflex-array-member-not-at-end warning
2025-09-09 15:42 [PATCH][next] geneve: Avoid -Wflex-array-member-not-at-end warning Gustavo A. R. Silva
@ 2025-09-09 16:15 ` Andrew Lunn
2025-09-12 2:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2025-09-09 16:15 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-kernel, linux-hardening
On Tue, Sep 09, 2025 at 05:42:39PM +0200, 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.
>
> Move the conflicting declaration to the end of the corresponding
> structure. Notice that `struct ip_tunnel_info` is a flexible
> structure, this is a structure that contains a flexible-array
> member.
>
> Fix the following warning:
>
> drivers/net/geneve.c:56:33: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH][next] geneve: Avoid -Wflex-array-member-not-at-end warning
2025-09-09 15:42 [PATCH][next] geneve: Avoid -Wflex-array-member-not-at-end warning Gustavo A. R. Silva
2025-09-09 16:15 ` Andrew Lunn
@ 2025-09-12 2:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-09-12 2:00 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: 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, 9 Sep 2025 17:42:39 +0200 you wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
>
> Move the conflicting declaration to the end of the corresponding
> structure. Notice that `struct ip_tunnel_info` is a flexible
> structure, this is a structure that contains a flexible-array
> member.
>
> [...]
Here is the summary with links:
- [next] geneve: Avoid -Wflex-array-member-not-at-end warning
https://git.kernel.org/netdev/net-next/c/4094920b19f7
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] 3+ messages in thread
end of thread, other threads:[~2025-09-12 2:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09 15:42 [PATCH][next] geneve: Avoid -Wflex-array-member-not-at-end warning Gustavo A. R. Silva
2025-09-09 16:15 ` Andrew Lunn
2025-09-12 2:00 ` 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