Re: [PATCH v1 04/13] iio: adc: ad4134: Serialize single-read operations

From: Jonathan Cameron

Date: Sun Sep 06 2026 - 14:55:34 EST


On 2026-09-03 09:27:19+03:00, Andy Shevchenko wrote:
> On Wed, Sep 02, 2026 at 02:22:41PM -0300, Marcelo Schmitt wrote:
>
> > Protect single-sample read operations from going wrong if two or more of
> > them run concurrently. Serialize the data read operation so to avoid
> > single-sample read requests disrupting each other.
>
> ...
>
> > case IIO_CHAN_INFO_RAW:

Define the scope.
case IIO_CHAN_INFO_RAW: {
Scope has a funny definition in switch statements and that can lead
to 'entertaining' results. Some compilers will also moan about this.

> > + guard(mutex)(&st->lock);
>
> Always delimit guard()() with a blank line.
>
> > gpiod_set_value_cansleep(st->odr_gpio, 1);
>
> ...
>
> With blank line added
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>