linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Kalle Valo <kvalo@kernel.org>
Cc: <linux-wireless@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	<linux-hardening@vger.kernel.org>
Subject: Re: [RFC] wireless: ti: Can we just remove this flexible array?
Date: Tue, 19 Mar 2024 15:54:27 -0700	[thread overview]
Message-ID: <328306d9-953f-482b-bf9a-a753d7d4e2ed@quicinc.com> (raw)
In-Reply-To: <3a531d5b-9bf6-4e88-ba8c-a76cfa95be20@embeddedor.com>

On 3/19/2024 2:59 PM, Gustavo A. R. Silva wrote:
> Hi!
> 
> `struct wl1271_cmd_header` is currently embedded in multiple other
> structs, and it's causing many `-Wflex-array-member-not-at-end` warnings.
> 
> Has this flexible-array member been used in the past or is it intended
> for future use?
> 
> Otherwise, I think we could just remove it.
> 
> diff --git a/drivers/net/wireless/ti/wlcore/cmd.h b/drivers/net/wireless/ti/wlcore/cmd.h
> index f2609d5b6bf7..4c2f2608ef3b 100644
> --- a/drivers/net/wireless/ti/wlcore/cmd.h
> +++ b/drivers/net/wireless/ti/wlcore/cmd.h
> @@ -208,8 +208,6 @@ enum cmd_templ {
>   struct wl1271_cmd_header {
>          __le16 id;
>          __le16 status;
> -       /* payload */
> -       u8 data[];
>   } __packed;

I'd think you should just remove it



  reply	other threads:[~2024-03-19 22:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 21:59 [RFC] wireless: ti: Can we just remove this flexible array? Gustavo A. R. Silva
2024-03-19 22:54 ` Jeff Johnson [this message]
2024-03-20  0:42   ` Gustavo A. R. Silva
2024-03-20  9:03     ` Johannes Berg
2024-03-20 17:10       ` Jeff Johnson

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=328306d9-953f-482b-bf9a-a753d7d4e2ed@quicinc.com \
    --to=quic_jjohnson@quicinc.com \
    --cc=gustavo@embeddedor.com \
    --cc=kvalo@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).