Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

power: supply: surface-charger: Fix type of integer variable

The ac->state field is __le32, not u32. So change the variable we're
temporarily storing it in to __le32 as well.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: e61ffb344591 ("power: supply: Add AC driver for Surface Aggregator Module")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Maximilian Luz and committed by
Sebastian Reichel
601423bc e633f33d

+1 -1
+1 -1
drivers/power/supply/surface_charger.c
··· 66 66 67 67 static int spwr_ac_update_unlocked(struct spwr_ac_device *ac) 68 68 { 69 - u32 old = ac->state; 69 + __le32 old = ac->state; 70 70 int status; 71 71 72 72 lockdep_assert_held(&ac->lock);