From: Johannes Berg <johannes@sipsolutions.net>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
Miri Korenblit <miriam.rachel.korenblit@intel.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] wifi: iwlwifi: mei: Remove unused flexible-array member in struct iwl_sap_hdr?
Date: Mon, 25 Aug 2025 10:20:09 +0200 [thread overview]
Message-ID: <4f8037dc97958e06dfb08d75fce982c1e4e36068.camel@sipsolutions.net> (raw)
In-Reply-To: <fbc03dee-273a-4c75-a8bb-fbc6ae48d26d@embeddedor.com>
On Mon, 2025-08-11 at 17:23 +0900, Gustavo A. R. Silva wrote:
> Hi all,
>
> At first sight, it seems that the flexible-array member `payload`
> in the struct below it's not being used:
>
> drivers/net/wireless/intel/iwlwifi/mei/sap.h:
> 298 /**
> 299 * struct iwl_sap_hdr - prefixes any SAP message
> 300 * @type: See &enum iwl_sap_msg.
> 301 * @len: The length of the message (header not included).
> 302 * @seq_num: For debug.
> 303 * @payload: The payload of the message.
> 304 */
> 305 struct iwl_sap_hdr {
> 306 __le16 type;
> 307 __le16 len;
> 308 __le32 seq_num;
> 309 u8 payload[];
> 310 };
>
> If we remove it, we'd get rid of 14 of the following type of warnings:
>
> drivers/net/wireless/intel/iwlwifi/mei/sap.h:318:28: warning: structure containing a flexible array member is not at the end of another structure
> [-Wflex-array-member-not-at-end]
>
> Is there any case where this array is actually used that I might
> be missing?
Check if it builds? But I don't see it used in our internal (and
possibly more recent) version of this either.
johannes
next prev parent reply other threads:[~2025-08-25 8:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 8:23 Gustavo A. R. Silva
2025-08-25 8:20 ` Johannes Berg [this message]
2025-08-27 8:20 ` 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=4f8037dc97958e06dfb08d75fce982c1e4e36068.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=gustavo@embeddedor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.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
all inboxes | Powered by JetHome®