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>
This commit is contained in:
Arthur Heymans
2022-11-17 12:09:12 +01:00
committed by Martin L Roth
parent 54a6b1f281
commit 8d9cce1e09

View File

@ -4636,12 +4636,12 @@ struct ec_params_charge_state {
struct __ec_todo_unpacked { struct __ec_todo_unpacked {
uint32_t param; /* enum charge_state_param */ uint32_t param; /* enum charge_state_param */
} get_param; } __ec_todo_packed get_param; /* coreboot change */
struct __ec_todo_unpacked { struct __ec_todo_unpacked {
uint32_t param; /* param to set */ uint32_t param; /* param to set */
uint32_t value; /* value to set */ uint32_t value; /* value to set */
} set_param; } __ec_todo_packed set_param; /* coreboot change */
}; };
uint8_t chgnum; /* Version 1 supports chgnum */ uint8_t chgnum; /* Version 1 supports chgnum */
} __ec_todo_packed; } __ec_todo_packed;