Re: [PATCH] iio: adc: ti-ads8688: use read_avail for available attributes
From: Gabriel Rondon
Date: Tue Mar 24 2026 - 08:25:04 EST
On Tue, 24 Mar 2026 13:42:40 +0200, Andy Shevchenko wrote:
> This is fragile code (however it probably won't be exposed IRL)
> if ADS8688_REALBITS == 32 this is UB in accordance with C standard.
>
> Also the trick with -BIT(x) is harder to read than simple GENMASK().
Good point. Will rework the expression in v2.
> Do not add trailing comma to a terminator.
Will fix.
> This is actually slightly different style to what is put in the above.
> Ideally should be unified, but probably matter for another change
Agreed, will leave for a separate change.
> Why is 'i' signed?
Will declare as unsigned int in the for loop.
> I would leave this on a single line (it's only 81 characters).
Will do.
Thanks for the review.
Gabriel