* [PATCH] platform/chrome: lightbar: Remove [0]
@ 2026-02-04 3:48 Gwendal Grignou
2026-02-04 4:45 ` Tzung-Bi Shih
0 siblings, 1 reply; 2+ messages in thread
From: Gwendal Grignou @ 2026-02-04 3:48 UTC (permalink / raw)
To: tzungbi; +Cc: chrome-platform, Gwendal Grignou
Variable arrays should be defined as [], not [0], otherwise
the kernel complains:
memcpy : detected field-spanning write (size 9) of single field "param->set_program_ex.data" at drivers/platform/chrome/cros_ec_lightbar.c:603 (size 0)
Fixes: d55493f6d2da ("platform/chrome: lightbar: Fix lightbar_program_ex alignment")
Signed-off-by: Gwendal Grignou <gwendal@google.com>
---
include/linux/platform_data/cros_ec_commands.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h
index bddc7568158e..8080a6fc6c8c 100644
--- a/include/linux/platform_data/cros_ec_commands.h
+++ b/include/linux/platform_data/cros_ec_commands.h
@@ -2028,7 +2028,7 @@ struct lightbar_program {
struct lightbar_program_ex {
uint8_t size;
uint16_t offset;
- uint8_t data[0];
+ uint8_t data[];
} __ec_todo_packed;
struct ec_params_lightbar {
--
2.53.0.rc2.204.g2597b5adb4-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-04 4:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 3:48 [PATCH] platform/chrome: lightbar: Remove [0] Gwendal Grignou
2026-02-04 4:45 ` Tzung-Bi Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox