Re: [RFC] rtc: Avoid a couple of -Wflex-array-member-not-at-end warnings
From: Gustavo A. R. Silva
Date: Thu Mar 13 2025 - 20:48:13 EST
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