[PATCH] soc: fsl: qe: Consolidate chained IRQ handler install/remove

Chen Ni posted 1 patch 8 months, 4 weeks ago
drivers/soc/fsl/qe/qe_ic.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
[PATCH] soc: fsl: qe: Consolidate chained IRQ handler install/remove
Posted by Chen Ni 8 months, 4 weeks ago
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/soc/fsl/qe/qe_ic.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c
index 17e6d2377c7c..4068b501a3a3 100644
--- a/drivers/soc/fsl/qe/qe_ic.c
+++ b/drivers/soc/fsl/qe/qe_ic.c
@@ -450,13 +450,11 @@ static int qe_ic_init(struct platform_device *pdev)
 
 	qe_ic_write(qe_ic->regs, QEIC_CICR, 0);
 
-	irq_set_handler_data(qe_ic->virq_low, qe_ic);
-	irq_set_chained_handler(qe_ic->virq_low, low_handler);
+	irq_set_chained_handler_and_data(qe_ic->virq_low, low_handler, qe_ic);
 
-	if (high_handler) {
-		irq_set_handler_data(qe_ic->virq_high, qe_ic);
-		irq_set_chained_handler(qe_ic->virq_high, high_handler);
-	}
+	if (high_handler)
+		irq_set_chained_handler_and_data(qe_ic->virq_high,
+						 high_handler, qe_ic);
 	return 0;
 }
 static const struct of_device_id qe_ic_ids[] = {
-- 
2.25.1
Re: [PATCH] soc: fsl: qe: Consolidate chained IRQ handler install/remove
Posted by Christophe Leroy 8 months, 3 weeks ago
On Thu, 15 May 2025 16:39:19 +0800, Chen Ni wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] soc: fsl: qe: Consolidate chained IRQ handler install/remove
      commit: 695d702f42bf4bd335e30f542ca710af081ee2a3

Best regards,
-- 
Christophe Leroy <christophe.leroy@csgroup.eu>