Skip to content

Commit

Permalink
hwmon: (dell-smm) Pack the whole smm_regs struct
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Armin Wolf authored and Guenter Roeck committed Dec 26, 2021
1 parent 20f2e67 commit 565210c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/hwmon/dell-smm-hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ MODULE_PARM_DESC(fan_max, "Maximum configurable fan speed (default: autodetect)"

struct smm_regs {
unsigned int eax;
unsigned int ebx __packed;
unsigned int ecx __packed;
unsigned int edx __packed;
unsigned int esi __packed;
unsigned int edi __packed;
};
unsigned int ebx;
unsigned int ecx;
unsigned int edx;
unsigned int esi;
unsigned int edi;
} __packed;

static const char * const temp_labels[] = {
"CPU",
Expand Down

0 comments on commit 565210c

Please sign in to comment.