diff options
author | Arnd Bergmann <[email protected]> | 2023-02-14 14:20:42 +0100 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2023-03-01 10:41:18 -0800 |
commit | 92304df83b943776492309f42452effea0cc1089 (patch) | |
tree | 2516084fd0a154b117038f6712eb11353ea1b5de /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | f122a08b197d076ccf136c73fae0146875812a88 (diff) |
power: supply: qcom_battmgr: remove bogus do_div()
The argument to do_div() is a 32-bit integer, and it was read from a
32-bit register so there is no point in doing a 64-bit division on it.
On 32-bit arm, do_div() causes a compile-time warning here:
include/asm-generic/div64.h:238:22: error: passing argument 1 of '__div64_32' from incompatible pointer type [-Werror=incompatible-pointer-types]
238 | __rem = __div64_32(&(n), __base); \
| ^~~~
| |
| unsigned int *
drivers/power/supply/qcom_battmgr.c:1130:4: note: in expansion of macro 'do_div'
1130 | do_div(battmgr->status.percent, 100);
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Sebastian Reichel <[email protected]>
Reviewed-by: Konrad Dybcio <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions