Re: [PATCH] iio: health: max30100: drop unnecessary cast
From: Andy Shevchenko
Date: Mon Mar 16 2026 - 07:28:58 EST
On Sat, Mar 14, 2026 at 05:33:01PM -0500, David Lechner wrote:
> Drop an unnecessary cast in max30100_led_init().
>
> val is defined as unsigned int val[2]; so the cast is not needed, nor
> is the address-of operator &.
>
> Also fix alignment with ( while we are touching this.
> ret = device_property_read_u32_array(dev, "maxim,led-current-microamp",
> - (unsigned int *) &val, 2);
> + val, 2);
You want to have ARRAY_SIZE() as well.
--
With Best Regards,
Andy Shevchenko