power: smb1398: Replace use of do_div() with plain division
do_div() operates on a 64-bit divisor and hence its use leads to the
following compilation error (error output edited for brevity):
warning: comparison of distinct pointer types ('typeof ((iout_ua)) *'
(aka 'int *') and 'uint64_t *' (aka 'unsigned long long *'))
[-Wcompare-distinct-pointer-types]
rc = smb1398_set_ichg_ma(chip, do_div(iout_ua, 1000));
^~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:226:28: note: expanded from macro 'do_div'
(void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
error: incompatible pointer types passing 'int *' to parameter of type
'uint64_t *' (aka 'unsigned long long *')
[-Werror,-Wincompatible-pointer-types]
rc = smb1398_set_ichg_ma(chip, do_div(iout_ua, 1000));
Fix this by replacing do_div() with a simple division operation.
Change-Id: Ifb43b7cc68e0424bfbd7fa58dce449d6dd849cd6
Signed-off-by:
Guru Das Srinagesh <gurus@codeaurora.org>
Loading
Please register or sign in to comment