mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "irqchip-bot for John Paul Adrian Glaubitz" <tip-bot2@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Rob Landley <rob@landley.net>, Marc Zyngier <maz@kernel.org>,
	tglx@linutronix.de
Subject: [irqchip: irq/irqchip-next] irqchip/jcore-aic: Fix missing allocation of IRQ descriptors
Date: Sat, 17 Jun 2023 07:02:46 -0000	[thread overview]
Message-ID: <168698536627.404.550156100246054585.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20230510163343.43090-1-glaubitz@physik.fu-berlin.de>

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     4848229494a323eeaab62eee5574ef9f7de80374
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4848229494a323eeaab62eee5574ef9f7de80374
Author:        John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
AuthorDate:    Wed, 10 May 2023 18:33:42 +02:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Sat, 17 Jun 2023 07:54:48 +01:00

irqchip/jcore-aic: Fix missing allocation of IRQ descriptors

The initialization function for the J-Core AIC aic_irq_of_init() is
currently missing the call to irq_alloc_descs() which allocates and
initializes all the IRQ descriptors. Add missing function call and
return the error code from irq_alloc_descs() in case the allocation
fails.

Fixes: 981b58f66cfc ("irqchip/jcore-aic: Add J-Core AIC driver")
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Tested-by: Rob Landley <rob@landley.net>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230510163343.43090-1-glaubitz@physik.fu-berlin.de
---
 drivers/irqchip/irq-jcore-aic.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/irqchip/irq-jcore-aic.c b/drivers/irqchip/irq-jcore-aic.c
index 5f47d8e..b9dcc8e 100644
--- a/drivers/irqchip/irq-jcore-aic.c
+++ b/drivers/irqchip/irq-jcore-aic.c
@@ -68,6 +68,7 @@ static int __init aic_irq_of_init(struct device_node *node,
 	unsigned min_irq = JCORE_AIC2_MIN_HWIRQ;
 	unsigned dom_sz = JCORE_AIC_MAX_HWIRQ+1;
 	struct irq_domain *domain;
+	int ret;
 
 	pr_info("Initializing J-Core AIC\n");
 
@@ -100,6 +101,12 @@ static int __init aic_irq_of_init(struct device_node *node,
 	jcore_aic.irq_unmask = noop;
 	jcore_aic.name = "AIC";
 
+	ret = irq_alloc_descs(-1, min_irq, dom_sz - min_irq,
+			      of_node_to_nid(node));
+
+	if (ret < 0)
+		return ret;
+
 	domain = irq_domain_add_legacy(node, dom_sz - min_irq, min_irq, min_irq,
 				       &jcore_aic_irqdomain_ops,
 				       &jcore_aic);

      parent reply	other threads:[~2023-06-17  7:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 16:33 [PATCH] " John Paul Adrian Glaubitz
2023-05-11  6:56 ` Marc Zyngier
2023-05-11  7:22   ` John Paul Adrian Glaubitz
2023-05-11  8:47     ` Marc Zyngier
2023-05-11  9:03       ` John Paul Adrian Glaubitz
2023-05-16 10:06         ` Marc Zyngier
2023-05-16 10:15           ` John Paul Adrian Glaubitz
2023-05-11 14:35 ` Geert Uytterhoeven
2023-05-11 14:47   ` John Paul Adrian Glaubitz
2023-05-12  3:21 ` Rob Landley
2023-06-17  7:02 ` irqchip-bot for John Paul Adrian Glaubitz [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=168698536627.404.550156100246054585.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=rob@landley.net \
    --cc=tglx@linutronix.de \
    /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®