Skip to content

Commit 565210c

Browse files
Wer-Wolfgroeck
authored andcommitted
hwmon: (dell-smm) Pack the whole smm_regs struct
When desiring the whole struct to be packed, __packed should be applied to the whole struct, not just every struct member except the first one. Tested on a Dell Inspiron 3505. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20211221162805.104202-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent 20f2e67 commit 565210c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/hwmon/dell-smm-hwmon.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ MODULE_PARM_DESC(fan_max, "Maximum configurable fan speed (default: autodetect)"
113113

114114
struct smm_regs {
115115
unsigned int eax;
116-
unsigned int ebx __packed;
117-
unsigned int ecx __packed;
118-
unsigned int edx __packed;
119-
unsigned int esi __packed;
120-
unsigned int edi __packed;
121-
};
116+
unsigned int ebx;
117+
unsigned int ecx;
118+
unsigned int edx;
119+
unsigned int esi;
120+
unsigned int edi;
121+
} __packed;
122122

123123
static const char * const temp_labels[] = {
124124
"CPU",

0 commit comments

Comments
 (0)