public inbox for chrome-platform@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v2] platform/chrome: lightbar: Fix lightbar_program_ex alignment
@ 2026-02-02 20:21 Gwendal Grignou
  2026-02-03  2:24 ` Tzung-Bi Shih
  0 siblings, 1 reply; 2+ messages in thread
From: Gwendal Grignou @ 2026-02-02 20:21 UTC (permalink / raw)
  To: tzungbi; +Cc: chrome-platform, Gwendal Grignou

Make sure sub-command of lightbar command starts with a 8bit
parameter to ensure alignment.

Fixes: 9600b8bdbfe4 ("platform/chrome: lightbar: Add support for large sequence")

Signed-off-by: Gwendal Grignou <gwendal@google.com>
---
Changes in v2:
- Update attribute to `__ec_todo_packed` to fix a clang warning.

 include/linux/platform_data/cros_ec_commands.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h
index 144243143034..bddc7568158e 100644
--- a/include/linux/platform_data/cros_ec_commands.h
+++ b/include/linux/platform_data/cros_ec_commands.h
@@ -2026,10 +2026,10 @@ struct lightbar_program {
  * EC RAM.
  */
 struct lightbar_program_ex {
-	uint16_t offset;
 	uint8_t size;
+	uint16_t offset;
 	uint8_t data[0];
-} __ec_todo_unpacked;
+} __ec_todo_packed;
 
 struct ec_params_lightbar {
 	uint8_t cmd;		      /* Command (see enum lightbar_command) */
-- 
2.53.0.rc1.225.gd81095ad13-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-03  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 20:21 [PATCH v2] platform/chrome: lightbar: Fix lightbar_program_ex alignment Gwendal Grignou
2026-02-03  2:24 ` 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