Re: [PATCH v2 1/4] iio: light: veml6030: remove unnecessary read of IT index
From: Andy Shevchenko
Date: Wed May 13 2026 - 16:01:08 EST
On Thu, May 14, 2026 at 07:17:24AM +1300, Javier Carrasco wrote:
> On Thu May 14, 2026 at 5:59 AM +13, Andy Shevchenko wrote:
> > On Wed, May 13, 2026 at 05:49:41PM +1300, Javier Carrasco wrote:
> >> This is dead code as the IT index is not used by gts to set the new scale.
> >> In its current form, the value is read but not used afterward. Remove
> >> the dead code.
> >
> > Does it have any side-effects on the HW side? Exempli gratia, flushing FIFO,
> > R1C (read to clear 1) bits?
> >
> >> Fixes: 22eaca4283b2 ("iio: light: veml6030: fix scale to conform to ABI")
> >
> > Not sure it fixes anything. But it might regress, see above why.
> >
> > ...
> >
> > If no side-effects, the code wise looks good.
> This patch does not have side effects on the HW side. Apart from having
> it tested with real HW, the operation being handled here is setting a
> new scale, which is stored in a persistent register.
It's not only about volatile bits, but good that you able to test on real HW,
this is much better than just theoretical clean up, thanks for confirming it
works as expected.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
--
With Best Regards,
Andy Shevchenko