提交 caee2849 编写于 作者: P Phong Tran 提交者: Sebastian Reichel

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/460Signed-off-by: NPhong Tran <tranmanphong@gmail.com>
Reviewed-by: NNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
上级 61e93655
......@@ -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++;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册