Re: [PATCH v2] iio: adc: xilinx-ams: Replace spin_lock() and unlock() calls with guard(spinlock*)()

From: Jonathan Cameron

Date: Mon May 11 2026 - 13:54:18 EST


On Fri, 8 May 2026 13:53:11 -0500
Maxwell Doose <m32285159@xxxxxxxxx> wrote:

> On Fri, May 8, 2026 at 1:50 PM Sanjay Chitroda
> <sanjayembeddedse@xxxxxxxxx> wrote:
> >
> > Hi Maxwell,
> >
> > Thanks for the resource cleanup change.
> >
> > Overall looks good.
> >
> > Also, there is opportunity for guard(mutex)().
> >
>
> Thanks, of course I'd also be happy to do the transition to
> guard(mutex)() but it seems like something for tomorrow evening since
> I've already submitted a lot to the mailing list.

Nice patch and well noted by Sanjay - I'd have just applied this
without checking for that :) I think sensible to do one patch that
deals with guard() for both mutex and spinlock.

Sometimes the Xilinx folk do review so I'll leave this a while longer
anyway in the hope they have time to take a look.
It's a safe change set but none the less nice to give time!

Thanks,

Jonathan

>
> best regards,
> max
>
>
>
>
> >
> > Thanks,
> > Sanjay Chitroda
> >
> >