* [PATCH] coccinelle: irqf_oneshot: fix irqf_oneshot.cocci warnings
2022-04-26 4:16 drivers/usb/phy/phy-generic.c:300:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ) kernel test robot
@ 2022-04-26 4:12 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-26 4:12 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1923 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Krzysztof Kozlowski <krzk@kernel.org>
CC: Julia Lawall <Julia.Lawall@inria.fr>
CC: Felipe Balbi <balbi@kernel.org>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: linux-usb(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
drivers/usb/phy/phy-generic.c:300:8-33: WARNING: Threaded IRQ with no primary handler requested without IRQF_ONESHOT (unless it is nested IRQ)
Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests")
threaded IRQs without a primary handler need to be requested with
IRQF_ONESHOT, otherwise the request will fail.
So pass the IRQF_ONESHOT flag in this case.
Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci
CC: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d615b5416f8a1afeb82d13b238f8152c572d59c0
commit: 5d2db9bb5f8a850d037983f0df72ad59cefa9e3d coccinelle: irqf_oneshot: reduce the severity due to false positives
:::::: branch date: 10 hours ago
:::::: commit date: 12 months ago
Please take the patch only if it's a positive warning. Thanks!
drivers/usb/phy/phy-generic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -300,7 +300,8 @@ static int usb_phy_generic_probe(struct
err = devm_request_threaded_irq(&pdev->dev,
gpiod_to_irq(nop->gpiod_vbus),
NULL, nop_gpio_vbus_thread,
- VBUS_IRQ_FLAGS, "vbus_detect",
+ VBUS_IRQ_FLAGS | IRQF_ONESHOT,
+ "vbus_detect",
nop);
if (err) {
dev_err(&pdev->dev, "can't request irq %i, err: %d\n",
^ permalink raw reply [flat|nested] 2+ messages in thread