Skip to contentSkip to conversation

platform/chrome: lightbar: Fix lightbar_program_ex alignment

PATCH In review Gwendal Grignou 2 participants 2 messages Feb 2 – Feb 3 ChromeOS EC subdrivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 platform/chrome: lightbar: Fix lightbar_program_ex alignment

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")

---
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(-)
include/linux/platform_data/cros_ec_commands.h +2 -2
index 144243143034..bddc7568158e 100644
@@ -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) */
Signature · 1 line
2.53.0.rc1.225.gd81095ad13-goog