[PATCH v2] iio: adc: xilinx-ams: Replace spin_lock() and unlock() calls with guard(spinlock*)()
Salih Erim
salih.erim at amd.com
Wed May 13 18:33:38 PDT 2026
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 <m32285159 at gmail.com>
> ---
> 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 <salih.erim at amd.com>
Salih.
More information about the linux-arm-kernel
mailing list