Re: [PATCH v1 2/4] iio: light: opt4001: Fix incompatible pointer type passed to div_u64_rem()
From: Nikhil Gautam
Date: Sun Jul 12 2026 - 23:31:56 EST
On 13-07-2026 06:13 am, Jonathan Cameron wrote:
On Mon, 13 Jul 2026 01:54:49 +0530There is no functional impact, int and u32 have the same size and
Nikhil Gautam <nikhilgtr@xxxxxxxxx> wrote:
div_u64_rem() takes a u32 * for the remainder but is passed val2,State what affect (if any) that has.
which is an int *. Use a local u32 for the remainder and assign the
result to *val2.
representation on all supported architectures, and the remainder is
always smaller than the divisor (10000000) so it fits in the positive
range of int. I will state this in the commit message and add the tag in v2.
Sure, will add Fixes tags to every patch.Signed-off-by: Nikhil Gautam <nikhilgtr@xxxxxxxxx>Fix looks good, just add the tag for v2.
...---
drivers/iio/light/opt4001.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Thanks for the quick review.return IIO_VAL_INT_PLUS_NANO;
}
L
Regards,
Nikhil