From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: Igor Russkikh <irusskikh@marvell.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
linux-hardening@vger.kernel.org
Subject: [PATCH][next] net: atlantic: Aavoid -Wflex-array-member-not-at-end warnings
Date: Mon, 5 Aug 2024 09:32:49 -0600 [thread overview]
Message-ID: <ZrDwoVKH8d6TdVxn@cute> (raw)
-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 structure. Notice
that `struct hw_atl_utils_fw_rpc` ends in a flexible-array member
through `struct offload_info fw2x_offloads;`
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]
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
index f010bda61c96..a66cd784f90e 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
@@ -194,10 +194,12 @@ struct aq_hw_s {
u32 rpc_addr;
u32 settings_addr;
u32 rpc_tid;
- struct hw_atl_utils_fw_rpc rpc;
s64 ptp_clk_offset;
u16 phy_id;
void *priv;
+
+ /* Must be last - ends in a flex-array member. */
+ struct hw_atl_utils_fw_rpc rpc;
};
struct aq_ring_s;
--
2.34.1
next reply other threads:[~2024-08-05 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 15:32 Gustavo A. R. Silva [this message]
2024-08-06 9:42 ` [EXTERNAL] [PATCH][next] net: atlantic: Aavoid -Wflex-array-member-not-at-end warnings Igor Russkikh
2024-08-06 13:42 ` Gustavo A. R. Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZrDwoVKH8d6TdVxn@cute \
--to=gustavoars@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=irusskikh@marvell.com \
--cc=kuba@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox