mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] irqchip/irq-pruss-intc: Consolidate chained IRQ handler install/remove
@ 2025-05-15  8:34 Chen Ni
  2025-05-15 15:09 ` [tip: irq/drivers] irqchip/irq-pruss-intc: Simplify chained interrupt handler setup tip-bot2 for Chen Ni
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2025-05-15  8:34 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Chen Ni

Chained irq handlers usually set up handler data as well.
irq_set_chained_handler_and_data() can set both under irq_desc->lock.
Replace the two calls with one.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 drivers/irqchip/irq-pruss-intc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
index 8f7c9dc45953..1feba8e26e27 100644
--- a/drivers/irqchip/irq-pruss-intc.c
+++ b/drivers/irqchip/irq-pruss-intc.c
@@ -581,8 +581,8 @@ static int pruss_intc_probe(struct platform_device *pdev)
 		host_data->intc = intc;
 		host_data->host_irq = i;
 
-		irq_set_handler_data(irq, host_data);
-		irq_set_chained_handler(irq, pruss_intc_irq_handler);
+		irq_set_chained_handler_and_data(irq, pruss_intc_irq_handler,
+						 host_data);
 	}
 
 	return 0;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip: irq/drivers] irqchip/irq-pruss-intc: Simplify chained interrupt handler setup
  2025-05-15  8:34 [PATCH] irqchip/irq-pruss-intc: Consolidate chained IRQ handler install/remove Chen Ni
@ 2025-05-15 15:09 ` tip-bot2 for Chen Ni
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Chen Ni @ 2025-05-15 15:09 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Chen Ni, Thomas Gleixner, x86, linux-kernel

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

Commit-ID:     3e402acd5c4f9d447849b9bfb5a5c61f10668b7e
Gitweb:        https://git.kernel.org/tip/3e402acd5c4f9d447849b9bfb5a5c61f10668b7e
Author:        Chen Ni <nichen@iscas.ac.cn>
AuthorDate:    Thu, 15 May 2025 16:34:50 +08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 15 May 2025 17:06:48 +02:00

irqchip/irq-pruss-intc: Simplify chained interrupt handler setup

The chained interrupt handler setup installs the handler and handler data
with two function call.s

irq_set_chained_handler_and_data() can set both in one operation. Replace
the two calls with one.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250515083450.3811411-1-nichen@iscas.ac.cn
---
 drivers/irqchip/irq-pruss-intc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
index bee0198..af76847 100644
--- a/drivers/irqchip/irq-pruss-intc.c
+++ b/drivers/irqchip/irq-pruss-intc.c
@@ -581,8 +581,7 @@ static int pruss_intc_probe(struct platform_device *pdev)
 		host_data->intc = intc;
 		host_data->host_irq = i;
 
-		irq_set_handler_data(irq, host_data);
-		irq_set_chained_handler(irq, pruss_intc_irq_handler);
+		irq_set_chained_handler_and_data(irq, pruss_intc_irq_handler, host_data);
 	}
 
 	return 0;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-15 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-15  8:34 [PATCH] irqchip/irq-pruss-intc: Consolidate chained IRQ handler install/remove Chen Ni
2025-05-15 15:09 ` [tip: irq/drivers] irqchip/irq-pruss-intc: Simplify chained interrupt handler setup tip-bot2 for Chen Ni

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®