]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: supply: cros_charge-control: Avoid -Wflex-array-member-not-at-end warning
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 29 Apr 2025 20:03:40 +0000 (14:03 -0600)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 29 Apr 2025 21:58:33 +0000 (23:58 +0200)
commitd4d2dc1b590c7416e1cf5fb6750fff2fa841690b
tree0b6d10b8dcc572879415c90d7b87c27d10449640
parent18672fe12367ed44df24ff38aa6ac350fac479f7
power: supply: cros_charge-control: Avoid -Wflex-array-member-not-at-end warning

-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.

Replace an on-stack definition of a flexible structure with a call
to utility function cros_ec_cmd().

So, with these changes, fix the following warning:

drivers/power/supply/cros_charge-control.c:57:40: 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@kernel.org>
Acked-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/aBEwnKtUOTYzS7C3@kspp
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/cros_charge-control.c