Skip to contentSkip to conversation

drivers: ipa: Fix missing IRQF_ONESHOT as only threaded handler

PATCH In review [email protected] 3 participants 3 messages Apr 16, 2021

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

PATCH 1/1 drivers: ipa: Fix missing IRQF_ONESHOT as only threaded handler

From: Guangqing Zhu <[email protected]>

Coccinelle noticed:
drivers/net/ipa/ipa_smp2p.c:186:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

---
 drivers/net/ipa/ipa_smp2p.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ipa/ipa_smp2p.c +2 -1
index a5f7a79a1923..74e04427a711 100644
@@ -183,7 +183,8 @@ static int ipa_smp2p_irq_init(struct ipa_smp2p *smp2p, const char *name,
 	}
 	irq = ret;
 
-	ret = request_threaded_irq(irq, NULL, handler, 0, name, smp2p);
+	ret = request_threaded_irq(irq, NULL, handler, IRQF_ONESHOT,
+				   name, smp2p);
 	if (ret) {
 		dev_err(dev, "error %d requesting \"%s\" IRQ\n", ret, name);
 		return ret;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 11 lines · On Fri, 16 Apr 2021 at 06:26, <[email protected]> wrote:

From: Guangqing Zhu <[email protected]>

Coccinelle noticed:
drivers/net/ipa/ipa_smp2p.c:186:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

---
 drivers/net/ipa/ipa_smp2p.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Did you test it? There are several patches like this all over the tree so it looks like "let's fix everything from Coccinelle" because you ignored at least in some of the cases that the handler is not the default primary one. I am not saying that the change is bad, but rather it looks automated and needs more consideration.

Best regards,
Krzysztof
Best regards,
Krzysztof

#2 lore raw
In reply to [email protected]
Quoted 1 line · On 4/15/21 10:40 PM, [email protected] wrote:

From: Guangqing Zhu <[email protected]>

This is not required here. -Alex

https://lore.kernel.org/netdev/[email protected]/

Quoted 24 lines

Coccinelle noticed:
drivers/net/ipa/ipa_smp2p.c:186:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

---
  drivers/net/ipa/ipa_smp2p.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ipa/ipa_smp2p.c +2 -1
index a5f7a79a1923..74e04427a711 100644
@@ -183,7 +183,8 @@ static int ipa_smp2p_irq_init(struct ipa_smp2p *smp2p, const char *name,
  	}
  	irq = ret;
 
-	ret = request_threaded_irq(irq, NULL, handler, 0, name, smp2p);
+	ret = request_threaded_irq(irq, NULL, handler, IRQF_ONESHOT,
+				   name, smp2p);
  	if (ret) {
  		dev_err(dev, "error %d requesting \"%s\" IRQ\n", ret, name);
  		return ret;