wm831x-dcdc: fix coccinelle warnings of missing IRQF_ONESHOT
PATCH 1/1 wm831x-dcdc: fix coccinelle warnings of missing IRQF_ONESHOT
From: Fengguang Wu <[email protected]>
/c/kernel-tests/src/linux/drivers/regulator/wm831x-dcdc.c:829:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT /c/kernel-tests/src/linux/drivers/regulator/wm831x-dcdc.c:695:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT /c/kernel-tests/src/linux/drivers/regulator/wm831x-dcdc.c:533:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT /c/kernel-tests/src/linux/drivers/regulator/wm831x-dcdc.c:542:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci
Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT
--- drivers/regulator/wm831x-dcdc.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/regulator/wm831x-dcdc.c +4 -4
@@ -532,7 +532,7 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev) irq =wm831x_irq (wm831x,platform_get_irq_byname (pdev,"UV" )); ret =request_threaded_irq (irq,NULL , wm831x_dcdc_uv_irq, -IRQF_TRIGGER_RISING , dcdc->name, dcdc); +IRQF_TRIGGER_RISING |IRQF_ONESHOT , dcdc->name, dcdc);if (ret !=0 ) {dev_err (&pdev->dev,"Failed to request UV IRQ %d: %d\n" , irq, ret);
@@ -541,7 +541,7 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev) irq =wm831x_irq (wm831x,platform_get_irq_byname (pdev,"HC" )); ret =request_threaded_irq (irq,NULL , wm831x_dcdc_oc_irq, -IRQF_TRIGGER_RISING , dcdc->name, dcdc); +IRQF_TRIGGER_RISING |IRQF_ONESHOT , dcdc->name, dcdc);if (ret !=0 ) {dev_err (&pdev->dev,"Failed to request HC IRQ %d: %d\n" , irq, ret);
@@ -694,7 +694,7 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev) irq =wm831x_irq (wm831x,platform_get_irq_byname (pdev,"UV" )); ret =request_threaded_irq (irq,NULL , wm831x_dcdc_uv_irq, -IRQF_TRIGGER_RISING , dcdc->name, dcdc); +IRQF_TRIGGER_RISING |IRQF_ONESHOT , dcdc->name, dcdc);if (ret !=0 ) {dev_err (&pdev->dev,"Failed to request UV IRQ %d: %d\n" , irq, ret);
@@ -828,7 +828,7 @@ static __devinit int wm831x_boostp_probe(struct platform_device *pdev) irq =wm831x_irq (wm831x,platform_get_irq_byname (pdev,"UV" )); ret =request_threaded_irq (irq,NULL , wm831x_dcdc_uv_irq, -IRQF_TRIGGER_RISING , dcdc->name, +IRQF_TRIGGER_RISING |IRQF_ONESHOT , dcdc->name, dcdc);if (ret !=0 ) { dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n",
Signature · 1 line
1.7.1
Quoted 11 lines · Feng Tang
From: Fengguang Wu <[email protected]>
/c/kernel-tests/src/linux/drivers/regulator/wm831x-dcdc.c:829:7-27: ERROR: Threaded IRQ with no primary handler requested without
IRQF_ONESHOT/c/kernel-tests/src/linux/drivers/regulator/wm831x-dcdc.c:695:7-27: ERROR: Threaded IRQ with no primary handler requested withoutIRQF_ONESHOT/c/kernel-tests/src/linux/drivers/regulator/wm831x-dcdc.c:533:7-27: ERROR: Threaded IRQ with no primary handler requested withoutIRQF_ONESHOT/c/kernel-tests/src/linux/drivers/regulator/wm831x-dcdc.c:542:7-27: ERROR: Threaded IRQ with no primary handler requested withoutIRQF_ONESHOTGenerated by:
scripts/coccinelle/misc/irqf_oneshot.cocciMake sure threaded IRQs without a primary handler are always request with
IRQF_ONESHOT
This is actually a false positive - _ONESHOT is only needed for interrupts without a primary handler if the interrupt controller is not threaded. For this driver (and most of the other wm831x drivers, as well as many other MFDs) we are guaranteed that the primary handler can never be called. It's not going to hurt, though.