[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ce80cdaa-f21e-4894-ab90-b4b05d03381d@embeddedor.com>
Date: Tue, 25 Nov 2025 18:07:31 +0900
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Loic Poulain <loic.poulain@....qualcomm.com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: Sergey Ryazanov <ryazanov.s.a@...il.com>,
Johannes Berg <johannes@...solutions.net>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2][next] net: wwan: mhi_wwan_mbim: Avoid
-Wflex-array-member-not-at-end warning
On 11/25/25 18:02, Loic Poulain wrote:
> On Tue, Nov 25, 2025 at 5:27 AM Gustavo A. R. Silva
> <gustavoars@...nel.org> wrote:
>>
>> Use DEFINE_RAW_FLEX() to avoid a -Wflex-array-member-not-at-end warning.
>>
>> Remove fixed-size array struct usb_cdc_ncm_dpe16 dpe16[2]; from struct
>> mbim_tx_hdr, so that flex-array member struct mbim_tx_hdr::ndp16.dpe16[]
>> ends last in this structure.
>>
>> Compensate for this by using the DEFINE_RAW_FLEX() helper to declare the
>> on-stack struct instance that contains struct usb_cdc_ncm_ndp16 as a
>> member. Adjust the rest of the code, accordingly.
>>
>> So, with these changes fix the following warning:
>>
>> drivers/net/wwan/mhi_wwan_mbim.c:81:34: 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@...nel.org>
>
> I just noticed there’s a V2, so:
>
> Reviewed-by: Loic Poulain <loic.poulain@....qualcomm.com>
Thanks, Loic. :)
-Gustavo
Powered by blists - more mailing lists