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

From: Andy Shevchenko

Date: Sun May 10 2026 - 05:24:57 EST


On Fri, May 08, 2026 at 07:45:13AM -0500, Maxwell Doose wrote:
> Include linux/cleanup.h to take advantage of RAII macros.
>
> Replace spin_lock() and unlock() calls with their RAII macro
> counterparts, which modernizes the code and increases readability.

> Remove "flags" variables where spin_lock_irqsave() has been replaced
> with guard(spinlock_irqsave)().

Unneeded detail, everyone can see that in the guard()() implementation
for the spin locks. Otherwise, LGTM.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko