diff options
author | Phong Tran <tranmanphong@gmail.com> | 2019-05-02 04:27:06 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2019-05-02 23:10:46 +0300 |
commit | caee28498ec35f0320a1b1eabbdfa3563cccdf4b (patch) | |
tree | 8720d285f7f389fd264762ed80d0b3282aeae72b /drivers | |
parent | 61e93655fc30cee7c91c85d6c41b96500d228d19 (diff) | |
download | linux-caee28498ec35f0320a1b1eabbdfa3563cccdf4b.tar.xz |
power: supply: core: fix clang -Wunsequenced
The increment operator of pointer in be32_to_cpu() is not explicitly.
It made the warning from clang:
drivers/power/supply/power_supply_core.c:674:36: error: multiple
unsequenced modifications to 'list' [-Werror,-Wunsequenced]
drivers/power/supply/power_supply_core.c:675:41: error: multiple
unsequenced modifications to 'list' [-Werror,-Wunsequenced]
Link: https://github.com/ClangBuiltLinux/linux/issues/460
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/supply/power_supply_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c index 874495c6face..f7033ecf6d0b 100644 --- a/drivers/power/supply/power_supply_core.c +++ b/drivers/power/supply/power_supply_core.c @@ -671,8 +671,10 @@ int power_supply_get_battery_info(struct power_supply *psy, } for (i = 0; i < tab_len; i++) { - table[i].ocv = be32_to_cpu(*list++); - table[i].capacity = be32_to_cpu(*list++); + table[i].ocv = be32_to_cpu(*list); + list++; + table[i].capacity = be32_to_cpu(*list); + list++; } } |