public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel•org>
To: devicetree@vger•kernel.org, linux-kernel@vger•kernel.org,
	linux-arm-kernel@lists•infradead.org
Cc: Jason Cooper <jason@lakedaemon•net>,
	Saravana Kannan <saravanak@google•com>,
	kernel-team@android•com, Hanks Chen <hanks.chen@mediatek•com>,
	Rob Herring <robh+dt@kernel•org>,
	Bjorn Andersson <bjorn.andersson@linaro•org>,
	Matthias Brugger <matthias.bgg@gmail•com>,
	Andy Gross <agross@kernel•org>,
	John Stultz <john.stultz@linaro•org>,
	Enric Balletbo i Serra <enric.balletbo@collabora•com>,
	Frank Wunderlich <linux@fw-web•de>,
	Frank Rowand <frowand.list@gmail•com>,
	Thomas Gleixner <tglx@linutronix•de>
Subject: [PATCH 2/6] irqchip: Make IRQCHIP_MATCH() type safe
Date: Sat, 12 Sep 2020 13:51:44 +0100	[thread overview]
Message-ID: <20200912125148.1271481-3-maz@kernel.org> (raw)
In-Reply-To: <20200912125148.1271481-1-maz@kernel.org>

IRQCHIP_DECLARE() is backed by macros that perform some elementary
type checking on the probe function. Unfortunately, IRQCHIP_MATCH()
doesn't, risking difficult debugging sessions...

Rewrite IRQCHIP_MATCH() in terms of _OF_DECLARE_ELMT() restore
the missing type safety.

Signed-off-by: Marc Zyngier <maz@kernel•org>
---
 include/linux/irqchip.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h
index 67351aac65ef..f8f25e9f8200 100644
--- a/include/linux/irqchip.h
+++ b/include/linux/irqchip.h
@@ -33,7 +33,7 @@ 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 },
+#define IRQCHIP_MATCH(compat, fn) _OF_DECLARE_ELMT(compat, fn, of_init_fn_2)
 
 #define IRQCHIP_PLATFORM_DRIVER_END(drv_name)				\
 	{},								\
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-09-12 12:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12 12:51 [PATCH 0/6] irqchip: Hybrid probing Marc Zyngier
2020-09-12 12:51 ` [PATCH 1/6] of: Add basic infrastructure to create early probe arrays Marc Zyngier
2020-09-12 23:20   ` Bjorn Andersson
2020-09-13  2:40   ` Bjorn Andersson
2020-09-12 12:51 ` Marc Zyngier [this message]
2020-09-12 23:20   ` [PATCH 2/6] irqchip: Make IRQCHIP_MATCH() type safe Bjorn Andersson
2020-09-12 12:51 ` [PATCH 3/6] irqchip: Introduce IRQCHIP_HYBRID_DRIVER_{BEGIN, END} macros Marc Zyngier
2020-09-12 23:21   ` Bjorn Andersson
2020-09-12 12:51 ` [PATCH 4/6] irqchip/mtk-cirq: Allow modular build Marc Zyngier
2020-09-12 23:22   ` Bjorn Andersson
2020-09-16  8:26     ` Enric Balletbo Serra
2020-09-12 12:51 ` [PATCH 5/6] irqchip/mtk-sysirq: " Marc Zyngier
2020-09-12 23:22   ` Bjorn Andersson
2020-09-16  8:22     ` Enric Balletbo Serra
2020-09-12 12:51 ` [PATCH 6/6] irqchip/qcom-pdc: " Marc Zyngier
2020-09-12 23:22   ` Bjorn Andersson
2020-09-14 20:33 ` [PATCH 0/6] irqchip: Hybrid probing John Stultz
2020-09-15 21:13 ` Rob Herring
2020-09-16  8:51   ` Marc Zyngier
2020-09-16 15:18     ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200912125148.1271481-3-maz@kernel.org \
    --to=maz@kernel$(echo .)org \
    --cc=agross@kernel$(echo .)org \
    --cc=bjorn.andersson@linaro$(echo .)org \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=enric.balletbo@collabora$(echo .)com \
    --cc=frowand.list@gmail$(echo .)com \
    --cc=hanks.chen@mediatek$(echo .)com \
    --cc=jason@lakedaemon$(echo .)net \
    --cc=john.stultz@linaro$(echo .)org \
    --cc=kernel-team@android$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux@fw-web$(echo .)de \
    --cc=matthias.bgg@gmail$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=saravanak@google$(echo .)com \
    --cc=tglx@linutronix$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox