soc: npcx: Add __packed to flags struct in npcx_pinctrl
When building with clang and CONFIG_LTO, clang warns: soc/nuvoton/npcx/common/pinctrl_soc.h:141:4: error: field flags within 'struct npcx_pinctrl' is less aligned than 'struct (unnamed struct at soc/nuvoton/npcx/common/./pinctrl_soc.h:128:2)' and is usually due to 'struct npcx_pinctrl' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] } flags; ^ Signed-off-by: Tom Hughes <tomhughes@chromium.org>
This commit is contained in:
parent
ad3df1d0f2
commit
94edd97233
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ struct npcx_pinctrl {
|
|||
struct npcx_psl_input psl_in;
|
||||
uint16_t cfg_word;
|
||||
} cfg;
|
||||
struct {
|
||||
struct __packed {
|
||||
/** Indicates the current pinctrl type. */
|
||||
enum npcx_pinctrl_type type :2;
|
||||
/** Properties used for pinmuxing. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue