Re: [PATCHv2 RESEND] irqchip: Add support for TI-NSPIRE irqchip

From: Thomas Gleixner
Date: Wed Dec 04 2013 - 05:31:55 EST


On Mon, 25 Nov 2013, dt.tangr@xxxxxxxxx wrote:
> diff --git a/drivers/irqchip/irq-zevio.c b/drivers/irqchip/irq-zevio.c
> +static void zevio_irq_ack(struct irq_data *irqd)
> +{
> + struct irq_chip_generic *gc = irq_data_get_irq_chip_data(irqd);
> + struct irq_chip_regs *regs =
> + &container_of(irqd->chip, struct irq_chip_type, chip)->regs;
> +
> + irq_gc_lock(gc);

Why do you need to lock here? You are reading the ack register and not
modifying it. You are neither storing the value in the gc itself. So
what are you trying to protect?

> + readl(gc->reg_base + regs->ack);
> + irq_gc_unlock(gc);
> +}
> +
> +static void init_base(void __iomem *base)

Shouldnt that be marked __init ?

> +{
> + /* Disable all interrupts */
> + writel(~0, base + IO_DISABLE);

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/