Re: [PATCH] iio: light: as73211: remove duplicate zero init of scan.chan[3]
From: Jonathan Cameron
Date: Sat Mar 21 2026 - 15:37:02 EST
On Mon, 16 Mar 2026 15:52:22 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Sun, Mar 15, 2026 at 02:21:51PM -0500, David Lechner wrote:
> > Remove setting scan.chan[3] to zero. Since commit 433b99e92294 ("iio:
> > light: as73211: Ensure buffer holes are zeroed"), the entire scan struct
> > is zeroed before being filled with data, so this is redundant.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
> ...
>
> > static irqreturn_t as73211_trigger_handler(int irq __always_unused, void *p)
>
> > (char *)&scan.chan[0], 3 * sizeof(scan.chan[0]));
>
> Side note: the above looks like a room to improve.
>
Applied. Indeed that's an ugly line!
Thanks,
Jonathan