From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: "Rob Herring" <robh@kernel.org>,
"Saravana Kannan" <saravanak@google.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Viresh Kumar" <viresh.kumar@linaro.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Yangtao Li" <tiny.windzz@gmail.com>,
"Chen-Yu Tsai" <wens@kernel.org>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Samuel Holland" <samuel@sholland.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Daniel Lezcano" <daniel.lezcano@linaro.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"Maximilian Luz" <luzmaximilian@gmail.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Daniel Lezcano" <daniel.lezcano@kernel.org>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-sunxi@lists.linux.dev,
linux-arm-msm@vger.kernel.org,
platform-driver-x86@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v2 07/11] irqchip/atmel-aic: Simplify with of_machine_get_match_data()
Date: Wed, 12 Nov 2025 14:06:32 +0100 [thread overview]
Message-ID: <202511121306329b57d6ee@mail.local> (raw)
In-Reply-To: <20251112-b4-of-match-matchine-data-v2-7-d46b72003fd6@linaro.org>
On 12/11/2025 11:28:52+0100, Krzysztof Kozlowski wrote:
> Replace open-coded getting root OF node, matching against it and getting
> the match data with new of_machine_get_match_data() helper.
>
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>
> Depends on the first OF patch.
> ---
> drivers/irqchip/irq-atmel-aic-common.c | 15 +++------------
> 1 file changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c
> index 3cad30a40c19..e68853815c7a 100644
> --- a/drivers/irqchip/irq-atmel-aic-common.c
> +++ b/drivers/irqchip/irq-atmel-aic-common.c
> @@ -187,20 +187,11 @@ void __init aic_common_rtt_irq_fixup(void)
>
> static void __init aic_common_irq_fixup(const struct of_device_id *matches)
> {
> - struct device_node *root = of_find_node_by_path("/");
> - const struct of_device_id *match;
> + void (*fixup)(void);
>
> - if (!root)
> - return;
> -
> - match = of_match_node(matches, root);
> -
> - if (match) {
> - void (*fixup)(void) = match->data;
> + fixup = of_machine_get_match_data(matches);
> + if (fixup)
> fixup();
> - }
> -
> - of_node_put(root);
> }
>
> struct irq_domain *__init aic_common_of_init(struct device_node *node,
>
> --
> 2.48.1
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-11-12 13:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 10:28 [PATCH v2 00/11] of: Add wrappers to match root node with OF device ID tables Krzysztof Kozlowski
2025-11-12 10:28 ` [PATCH v2 01/11] " Krzysztof Kozlowski
2025-11-13 9:55 ` Lukasz Luba
2025-11-12 10:28 ` [PATCH v2 02/11] cpufreq: dt-platdev: Simplify with of_machine_get_match_data() Krzysztof Kozlowski
2025-11-12 11:44 ` AngeloGioacchino Del Regno
2025-11-12 10:28 ` [PATCH v2 03/11] cpufreq: mediatek: " Krzysztof Kozlowski
2025-11-12 11:44 ` AngeloGioacchino Del Regno
2025-11-12 10:28 ` [PATCH v2 04/11] cpufreq: sun50i: Simplify with of_machine_device_match() Krzysztof Kozlowski
2025-11-12 10:28 ` [PATCH v2 05/11] cpuidle: big_little: " Krzysztof Kozlowski
2025-11-12 11:44 ` AngeloGioacchino Del Regno
2025-11-12 10:28 ` [PATCH v2 06/11] firmware: qcom: scm: " Krzysztof Kozlowski
2025-11-12 11:44 ` AngeloGioacchino Del Regno
2025-11-12 10:28 ` [PATCH v2 07/11] irqchip/atmel-aic: Simplify with of_machine_get_match_data() Krzysztof Kozlowski
2025-11-12 13:06 ` Alexandre Belloni [this message]
2025-11-12 10:28 ` [PATCH v2 08/11] platform: surface: " Krzysztof Kozlowski
2025-11-12 10:28 ` [PATCH v2 09/11] powercap: dtpm: " Krzysztof Kozlowski
2025-11-13 9:50 ` Lukasz Luba
2025-11-12 10:28 ` [PATCH v2 10/11] soc: qcom: ubwc: " Krzysztof Kozlowski
2025-11-12 10:28 ` [PATCH v2 11/11] soc: tegra: Simplify with of_machine_device_match() Krzysztof Kozlowski
2025-11-12 11:44 ` AngeloGioacchino Del Regno
2025-11-14 13:17 ` Thierry Reding
2025-11-12 11:52 ` [PATCH v2 00/11] of: Add wrappers to match root node with OF device ID tables AngeloGioacchino Del Regno
2025-11-14 13:24 ` Thierry Reding
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=202511121306329b57d6ee@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=andersson@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=daniel.lezcano@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=konradybcio@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=nicolas.ferre@microchip.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=samuel@sholland.org \
--cc=saravanak@google.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=tiny.windzz@gmail.com \
--cc=viresh.kumar@linaro.org \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).