Re: [PATCH v4 09/14] irqchip: Provide platform_device to of_irq_init_cb_t
From: Marc Zyngier <maz@kernel.org>
Date: 2021-10-20 08:24:56
Also in:
linux-devicetree, linux-mips, lkml
From: Marc Zyngier <maz@kernel.org>
Date: 2021-10-20 08:24:56
Also in:
linux-devicetree, linux-mips, lkml
On Tue, 19 Oct 2021 23:23:52 +0100, Rob Herring [off-list ref] wrote:
On Tue, Oct 19, 2021 at 4:43 PM Marc Zyngier [off-list ref] wrote:quoted
diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h index ccf32758ea85..146a9d80a6a2 100644 --- a/include/linux/irqchip.h +++ b/include/linux/irqchip.h@@ -33,7 +33,15 @@ extern int platform_irqchip_probe(struct platform_device *pdev); #define IRQCHIP_PLATFORM_DRIVER_BEGIN(drv_name) \ static const struct of_device_id drv_name##_irqchip_match_table[] = { -#define IRQCHIP_MATCH(compat, fn) { .compatible = compat, .data = fn }, +/* Undefined on purpose */ +int typecheck_irq_init_cb(struct device_node *, struct device_node *, + struct platform_device *); + +#define typecheck_irq_init_cb(fn) \ + __typecheck(typecheck_irq_init_cb, fn) ? fn : fnThat's nice! Shouldn't it also be used for IRQCHIP_DECLARE?
Absolutely. And enabling this shows that changing of_irq_init_cb_t breaks *all users* of IRQCHIP_DECLARE(). Not an acceptable outcome when we're at -rc5. Why can't the relevant drivers use of_find_device_by_node() instead? That would allow us to keep the status-quo on of_irq_init_cb_t. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel