Re: [PATCH 4/7] iio: light: opt3001: move driver to guard(mutex)() use
From: Joshua Crofts
Date: Mon May 11 2026 - 07:15:01 EST
On Mon, 11 May 2026 at 13:07, Andy Shevchenko
<andriy.shevchenko@xxxxxxxxx> wrote:
>
> On Mon, May 11, 2026 at 12:04:09PM +0200, Joshua Crofts via B4 Relay wrote:
>
> > Move driver to use guard(mutex)() macro, to facilitate automatic
> > locking/unlocking of resources. This modernizes the driver and
> > improves code style.
>
> This one LGTM,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
> ...
>
> Side note for the additional patch, in case you want to address that.
>
> > dev_err(opt->dev, "failed to read register %02x\n",
> > OPT3001_CONFIGURATION);
>
> Broken indentation.
>
> ...
>
> > ret = i2c_smbus_write_word_swapped(opt->client, OPT3001_CONFIGURATION,
> > reg);
>
> Ditto.
>
> ...
>
> > dev_err(opt->dev, "failed to write register %02x\n",
> > OPT3001_CONFIGURATION);
>
> Ditto.
>
> ...
>
> There may be more, I haven't checked, but maybe we want to clean this up as
> well at some point.
There are about 30 errors when running checkpatch with the --strict flag haha,
I wanted to address it in another series, but I guess I can do it now
(only annoying
thing is that there will be lines longer than 80 characters).
--
Kind regards
CJD