Re: [PATCH v2 5/5] iio: light: si1133: use guard(mutex)() macro
From: Joshua Crofts
Date: Tue Apr 28 2026 - 13:24:07 EST
On Tue, 28 Apr 2026 at 17:20, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> > if (cmd == SI1133_CMD_FORCE) {
> > /* wait for irq */
> > if (!wait_for_completion_timeout(&data->completion,
> > - msecs_to_jiffies(SI1133_COMPLETION_TIMEOUT_MS))) {
> > - err = -ETIMEDOUT;
> > - goto out;
> > - }
> > + msecs_to_jiffies(SI1133_COMPLETION_TIMEOUT_MS)))
> > + return -ETIMEDOUT;
> This is some unfortunate indentation from readability point of view.
> I'd reindent and not worry about the long line - it's very long but still under 100 so
> tools won't complain and I think it is worth the pain here!
>
> > if (!wait_for_completion_timeout(&data->completion,
> msecs_to_jiffies(SI1133_COMPLETION_TIMEOUT_MS)))
> return -ETIMEDOUT;
>
> or perhaps better yet, use a local variable for that timeout.
Okay, I'll probably do a separate patch for that though.
--
Kind regards
CJD