mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Andrew Davis" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Andrew Davis <afd@ti.com>, Thomas Gleixner <tglx@kernel.org>,
	Radu Rendec <radu@rendec.net>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/drivers] irqchip/pruss-intc: Use match data directly
Date: Mon, 07 Sep 2026 19:51:32 -0000	[thread overview]
Message-ID: <178881069241.623050.4471914871936869241.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260903185220.2014861-1-afd@ti.com>

The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     02a2db115989749b945fc1dc3e935a4a07eebb8e
Gitweb:        https://git.kernel.org/tip/02a2db115989749b945fc1dc3e935a4a07eebb8e
Author:        Andrew Davis <afd@ti.com>
AuthorDate:    Thu, 03 Sep 2026 13:52:19 -05:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Mon, 07 Sep 2026 21:47:51 +02:00

irqchip/pruss-intc: Use match data directly

The match data is fetched before the instance data is available, but it is
not used until after. Skip the temporary variable and fetch the match data
after it has a place to be stored.

Signed-off-by: Andrew Davis <afd@ti.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/20260903185220.2014861-1-afd@ti.com
---
 drivers/irqchip/irq-pruss-intc.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
index 81078d5..cc3a7c2 100644
--- a/drivers/irqchip/irq-pruss-intc.c
+++ b/drivers/irqchip/irq-pruss-intc.c
@@ -516,24 +516,21 @@ static const char * const irq_names[MAX_NUM_HOST_IRQS] = {
 
 static int pruss_intc_probe(struct platform_device *pdev)
 {
-	const struct pruss_intc_match_data *data;
 	struct device *dev = &pdev->dev;
 	struct pruss_intc *intc;
 	struct pruss_host_irq_data *host_data;
 	int i, irq, ret;
 	u8 max_system_events, irqs_reserved = 0;
 
-	data = of_device_get_match_data(dev);
-	if (!data)
-		return -ENODEV;
-
-	max_system_events = data->num_system_events;
-
 	intc = devm_kzalloc(dev, sizeof(*intc), GFP_KERNEL);
 	if (!intc)
 		return -ENOMEM;
 
-	intc->soc_config = data;
+	intc->soc_config = of_device_get_match_data(dev);
+	if (!intc->soc_config)
+		return -ENODEV;
+	max_system_events = intc->soc_config->num_system_events;
+
 	intc->dev = dev;
 	platform_set_drvdata(pdev, intc);
 

      parent reply	other threads:[~2026-09-07 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 18:52 [PATCH 1/2] " Andrew Davis
2026-09-03 18:52 ` [PATCH 2/2] irqchip/pruss-intc: Use scoped lock guard and devm_mutex_init Andrew Davis
2026-09-05 16:01   ` Radu Rendec
2026-09-07 19:51   ` [tip: irq/drivers] " tip-bot2 for Andrew Davis
2026-09-05 14:02 ` [PATCH 1/2] irqchip/pruss-intc: Use match data directly Radu Rendec
2026-09-07 19:51 ` tip-bot2 for Andrew Davis [this message]

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=178881069241.623050.4471914871936869241.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=afd@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=radu@rendec.net \
    --cc=tglx@kernel.org \
    --cc=x86@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

all inboxes | Powered by JetHome®