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

From: Gregory CLEMENT
Date: Mon Apr 14 2025 - 10:50:51 EST


Hello Thomas,

> Conversion was done with Coccinelle. No functional change.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Andrew Lunn <andrew@xxxxxxx>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx>
> Cc: Gregory Clement <gregory.clement@xxxxxxxxxxx>

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
https://bootlin.com