Martin L Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/69742 )
Change subject: ec/google/chromeec: Add packed attribute to structs in union ......................................................................
ec/google/chromeec: Add packed attribute to structs in union
Clang warns about structs inside a union also needing the packed attribute.
This files is copied from the chromeec project, so it adds comment next to the coreboot specific changes as a reference.
TEST: google/vilboz remains the same with BUILD_TIMELESS=1 and gcc.
Change-Id: I8b5233618081db86caedcb2d14870974e109ed9b Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/69742 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin L Roth gaumless@gmail.com --- M src/ec/google/chromeec/ec_commands.h 1 file changed, 23 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Martin L Roth: Looks good to me, approved
diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h index 0bb5db6..7c311a1 100644 --- a/src/ec/google/chromeec/ec_commands.h +++ b/src/ec/google/chromeec/ec_commands.h @@ -4636,12 +4636,12 @@
struct __ec_todo_unpacked { uint32_t param; /* enum charge_state_param */ - } get_param; + } __ec_todo_packed get_param; /* coreboot change */
struct __ec_todo_unpacked { uint32_t param; /* param to set */ uint32_t value; /* value to set */ - } set_param; + } __ec_todo_packed set_param; /* coreboot change */ }; uint8_t chgnum; /* Version 1 supports chgnum */ } __ec_todo_packed;