[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <63d0cca7-b095-4762-8ec4-5004e5c6bad1@embeddedor.com>
Date: Fri, 14 Mar 2025 11:17:45 +1030
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Tzung-Bi Shih <tzungbi@...nel.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>,
Benson Leung <bleung@...omium.org>, Guenter Roeck <groeck@...omium.org>,
linux-rtc@...r.kernel.org, chrome-platform@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [RFC] rtc: Avoid a couple of -Wflex-array-member-not-at-end
warnings
> I'm not a big fan of the solution. How about using something similar to:
>
> struct cros_ec_command *msg = kzalloc(sizeof(*msg) +
> sizeof(struct ec_response_rtc), ...);
>
Thanks for the feedback. :) We can actually use DEFINE_RAW_FLEX():
https://lore.kernel.org/linux-hardening/Z9N8BsVJF-s6Hcvd@kspp/
--
Gustavo
Powered by blists - more mailing lists