Skip to contentSkip to conversation

irqchip: gic: fix irq_trigger return

PATCH In review Stephen Boyd 2 participants 3 messages Mar 19, 2013 – Mar 26, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip: gic: fix irq_trigger return

From: Abhijeet Dharmapurikar <[email protected]>

The genirq layer expects a 0 in case of failure but the code is returning -ENXIO. Fix it.

---
 drivers/irqchip/irq-gic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/irqchip/irq-gic.c +2 -1
index 644d724..2ebf28a 100644
@@ -236,7 +236,8 @@ static int gic_retrigger(struct irq_data *d)
 	if (gic_arch_extn.irq_retrigger)
 		return gic_arch_extn.irq_retrigger(d);
 
-	return -ENXIO;
+	/* the genirq layer expects 0 for a failure */
+	return 0;
 }
 
 #ifdef CONFIG_SMP
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
#1 lore raw
Quoted 16 lines · Stephen Boyd

From: Abhijeet Dharmapurikar <[email protected]>

The genirq layer expects a 0 in case of failure but the code is returning -ENXIO. Fix it.

---
 drivers/irqchip/irq-gic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/irqchip/irq-gic.c +0 -0
index 644d724..2ebf28a 100644

drivers/irqchip/irq-gic.c static int gic_retrigger(struct irq_data *d) · line 243

Quoted 9 lines
drivers/irqchip/irq-gic.c +2 -1
@@ -236,7 +236,8 @@ static int gic_retrigger(struct irq_data *d)
 	if (gic_arch_extn.irq_retrigger)
 		return gic_arch_extn.irq_retrigger(d);
 
-	return -ENXIO;
+	/* the genirq layer expects 0 for a failure */
+	return 0;
 }
 
 #ifdef CONFIG_SMP

Ping.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
#2 lore raw
In reply to Stephen Boyd
irqchip: gic: fix irq_trigger return
Commit-ID:  bad9a43a20372a3b41e15e8aa03b918c76f360f0
Gitweb:     http://git.kernel.org/tip/bad9a43a20372a3b41e15e8aa03b918c76f360f0
Author:     Abhijeet Dharmapurikar <[email protected]>
AuthorDate: Tue, 19 Mar 2013 16:05:49 -0700
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Tue, 26 Mar 2013 20:52:25 +0100

irqchip: gic: fix irq_trigger return

The genirq layer expects a 0 in case that the retrigger function is not able to resend the irq in hardware, but the code is returning -ENXIO. Fix it.

[ tglx: Reworked comment and changelog ]

---
 drivers/irqchip/irq-gic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/irqchip/irq-gic.c +2 -1
index a32e0d5..fc6aebf 100644
@@ -236,7 +236,8 @@ static int gic_retrigger(struct irq_data *d)
 	if (gic_arch_extn.irq_retrigger)
 		return gic_arch_extn.irq_retrigger(d);
 
-	return -ENXIO;
+	/* the genirq layer expects 0 if we can't retrigger in hardware */
+	return 0;
 }
 
 #ifdef CONFIG_SMP