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

From: Salih Erim <[email-masked]>
Date: Thu, 14 May 2026 02:33:38 +0100

Hi Maxwell,

On 5/8/2026 1:45 PM, 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)().
> 
> Signed-off-by: Maxwell Doose <[email-masked]>
> ---
>   v2:
>   - Replace guard(spinlock_irq)() in ams_unmask_worker() with
>     scoped_guard() per Jonathan's suggestion.

Nice cleanup, thanks for taking care of this.

Reviewed-by: Salih Erim <[email-masked]>

Salih.