[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1609131713490.6233@nanos>
Date: Tue, 13 Sep 2016 17:21:26 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Alexandre TORGUE <alexandre.torgue@...com>
cc: Maxime Coquelin <mcoquelin.stm32@...il.com>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <marc.zyngier@....com>,
Linus Walleij <linus.walleij@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Rob Herring <robh+dt@...nel.org>, linux-gpio@...r.kernel.org,
arnd@...db.de, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Daniel Thompson <daniel.thompson@...aro.org>,
bruherrera@...il.com, lee.jones@...aro.org
Subject: Re: [PATCH v5 2/9] drivers: irqchip: Add STM32 external interrupts
support
On Fri, 9 Sep 2016, Alexandre TORGUE wrote:
> +static void stm32_exti_free(struct irq_domain *d, unsigned int virq,
> + unsigned int nr_irqs)
> +{
> + struct irq_data *data = irq_get_irq_data(virq);
> +
> + irq_gc_mask_clr_bit(data->parent_data);
I have a hard time to understand this. The irq domain is not hierarchical.
> + irq_domain_reset_irq_data(data);
> + domain = irq_domain_add_linear(node, nr_exti,
> + &irq_exti_domain_ops, NULL);
It's a simple linear domain. So how can data->parent_data be a valid
irq_data pointer? Answer: It can't!
But it doesn't blow up in your face simply because the alloc/free callbacks
are never invoked for simple non hierarchical domains. So you should have
removed that stuff after copying some other irqchip driver.
Thanks,
tglx
Powered by blists - more mailing lists