1 // SPDX-License-Identifier: GPL-2.0
2 /// Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests")
3 /// threaded IRQs without a primary handler need to be requested with
4 /// IRQF_ONESHOT, otherwise the request will fail.
6 /// So pass the IRQF_ONESHOT flag in this case.
9 // Confidence: Moderate
11 // Options: --no-includes
19 expression dev, irq, thread_fn;
23 request_threaded_irq@p(irq, NULL, thread_fn,
31 devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
41 expression dev, irq, thread_fn, flags, e;
45 flags = IRQF_ONESHOT | ...
47 flags |= IRQF_ONESHOT | ...
51 request_threaded_irq@p(irq, NULL, thread_fn, flags, ...);
53 devm_request_threaded_irq@p(dev, irq, NULL, thread_fn, flags, ...);
57 expression dev, irq, thread_fn, flags;
58 position p != {r1.p,r2.p};
61 request_threaded_irq@p(irq, NULL, thread_fn,
71 devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
84 position p != {r1.p,r2.p};
87 *request_threaded_irq@p(irq, NULL, ...)
89 *devm_request_threaded_irq@p(dev, irq, NULL, ...)
93 @match depends on report || org@
95 position p != {r1.p,r2.p};
98 request_threaded_irq@p(irq, NULL, ...)
100 devm_request_threaded_irq@p(dev, irq, NULL, ...)
103 @script:python depends on org@
106 msg = "ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT"
107 coccilib.org.print_todo(p[0],msg)
109 @script:python depends on report@
112 msg = "ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT"
113 coccilib.report.print_report(p[0],msg)