Re: [PATCH v3] iio: chemical: sps30: Replace manual locking with RAII locking
From: Andy Shevchenko
Date: Sun May 17 2026 - 04:05:59 EST
On Fri, May 15, 2026 at 03:57:21PM +0100, Jonathan Cameron wrote:
> On Fri, 15 May 2026 09:35:03 -0500
> Maxwell Doose <m32285159@xxxxxxxxx> wrote:
> > On Fri, May 15, 2026 at 9:18 AM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
...
> > TBH I'm fairly confused on what Andy wanted in terms of "what do I
> > wrap". If he wants me to put the guard()() into the function call
> > itself I can do that but see the (ps) in my other email.
>
> I guess you mean:
> Andy:
> "Ah, I was under impression that this is (unlocked version) is used somewhere
> else. Since it's not the case, the wrapper is not needed, just use guard()()
> in the original code."
>
> Could be read either way but I think he'll be fine with it in sps30_do_meas()
> even if the other direction was what he was thinking of.
Sorry for the confusion. Either just put a guard()() into the original function
(whatever its name is) or into a wrapper. I.o.w. as Jonathan said I'm fine with
both approaches.
--
With Best Regards,
Andy Shevchenko