Re: [patch 4/7] ARM: orion/gpio:: Convert generic irqchip locking to guard()

Gregory CLEMENT
2025-04-14T14:29:44Z

Hello Thomas,

> Conversion was done with Coccinelle. No functional change.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Cc: Gregory Clement <gregory.clement@bootlin.com>

Applied on mvebu/arm

Thanks,

Gregory

> ---
> arch/arm/plat-orion/gpio.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> --- a/arch/arm/plat-orion/gpio.c
> +++ b/arch/arm/plat-orion/gpio.c
> @@ -496,11 +496,10 @@ static void orion_gpio_unmask_irq(struct
> u32 reg_val;
> u32 mask = d->mask;
>
> - irq_gc_lock(gc);
> + guard(raw_spinlock)(&gc->lock);
> reg_val = irq_reg_readl(gc, ct->regs.mask);
> reg_val |= mask;
> irq_reg_writel(gc, reg_val, ct->regs.mask);
> - irq_gc_unlock(gc);
> }
>
> static void orion_gpio_mask_irq(struct irq_data *d)
> @@ -510,11 +509,10 @@ static void orion_gpio_mask_irq(struct i
> u32 mask = d->mask;
> u32 reg_val;
>
> - irq_gc_lock(gc);
> + guard(raw_spinlock)(&gc->lock);
> reg_val = irq_reg_readl(gc, ct->regs.mask);
> reg_val &= ~mask;
> irq_reg_writel(gc, reg_val, ct->regs.mask);
> - irq_gc_unlock(gc);
> }
>
> void __init orion_gpio_init(int gpio_base, int ngpio,
>

--
Grégory CLEMENT, Bootlin
Embedded Linux and Kernel engineering