Skip to contentSkip to conversation

regulator: mt6360: Fix missing IRQF_ONESHOT as only threaded handler

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

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

PATCH 1/1 regulator: mt6360: Fix missing IRQF_ONESHOT as only threaded handler

From: Guangqing Zhu <[email protected]>

Coccinelle noticed:
drivers/regulator/mt6360-regulator.c:386:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

---
 drivers/regulator/mt6360-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/mt6360-regulator.c +2 -2
index 4d34be94d166..34c354721ef0 100644
@@ -383,8 +383,8 @@ static int mt6360_regulator_irq_register(struct platform_device *pdev,
 		if (irq < 0)
 			return irq;
 
-		ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, irq_desc->handler, 0,
-						irq_desc->name, rdev);
+		ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, irq_desc->handler,
+						IRQF_ONESHOT, irq_desc->name, rdev);
 		if (ret) {
 			dev_err(&pdev->dev, "Fail to request %s irq\n", irq_desc->name);
 			return ret;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · On Fri, 16 Apr 2021 at 06:30, <[email protected]> wrote:

From: Guangqing Zhu <[email protected]>

Coccinelle noticed:
drivers/regulator/mt6360-regulator.c:386:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT

This should be tested. 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 primary one. I am not saying that the change is bad, but rather it looks automated.

Best regards,
Krzysztof