2015-05-20 05:02:35 -06:00
|
|
|
/// Make sure threaded IRQs without a primary handler are always requested with
|
2012-07-01 05:17:07 -06:00
|
|
|
/// IRQF_ONESHOT
|
|
|
|
///
|
|
|
|
//
|
|
|
|
// Confidence: Good
|
|
|
|
// Comments:
|
|
|
|
// Options: --no-includes
|
|
|
|
|
|
|
|
virtual patch
|
|
|
|
virtual context
|
|
|
|
virtual org
|
|
|
|
virtual report
|
|
|
|
|
|
|
|
@r1@
|
2015-03-04 01:32:32 -07:00
|
|
|
expression dev;
|
2012-07-01 05:17:07 -06:00
|
|
|
expression irq;
|
|
|
|
expression thread_fn;
|
|
|
|
expression flags;
|
|
|
|
position p;
|
|
|
|
@@
|
2015-03-04 01:32:32 -07:00
|
|
|
(
|
2012-07-01 05:17:07 -06:00
|
|
|
request_threaded_irq@p(irq, NULL, thread_fn,
|
|
|
|
(
|
|
|
|
flags | IRQF_ONESHOT
|
|
|
|
|
|
|
|
|
IRQF_ONESHOT
|
|
|
|
)
|
|
|
|
, ...)
|
2015-03-04 01:32:32 -07:00
|
|
|
|
|
|
|
|
devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
|
|
|
|
(
|
|
|
|
flags | IRQF_ONESHOT
|
|
|
|
|
|
|
|
|
IRQF_ONESHOT
|
|
|
|
)
|
|
|
|
, ...)
|
|
|
|
)
|
2012-07-01 05:17:07 -06:00
|
|
|
|
|
|
|
@depends on patch@
|
2015-03-04 01:32:32 -07:00
|
|
|
expression dev;
|
2012-07-01 05:17:07 -06:00
|
|
|
expression irq;
|
|
|
|
expression thread_fn;
|
|
|
|
expression flags;
|
|
|
|
position p != r1.p;
|
|
|
|
@@
|
2015-03-04 01:32:32 -07:00
|
|
|
(
|
2012-07-01 05:17:07 -06:00
|
|
|
request_threaded_irq@p(irq, NULL, thread_fn,
|
|
|
|
(
|
|
|
|
-0
|
|
|
|
+IRQF_ONESHOT
|
|
|
|
|
|
|
|
|
-flags
|
|
|
|
+flags | IRQF_ONESHOT
|
|
|
|
)
|
|
|
|
, ...)
|
2015-03-04 01:32:32 -07:00
|
|
|
|
|
|
|
|
devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
|
|
|
|
(
|
|
|
|
-0
|
|
|
|
+IRQF_ONESHOT
|
|
|
|
|
|
|
|
|
-flags
|
|
|
|
+flags | IRQF_ONESHOT
|
|
|
|
)
|
|
|
|
, ...)
|
|
|
|
)
|
2012-07-01 05:17:07 -06:00
|
|
|
|
|
|
|
@depends on context@
|
|
|
|
position p != r1.p;
|
|
|
|
@@
|
|
|
|
*request_threaded_irq@p(...)
|
|
|
|
|
|
|
|
@match depends on report || org@
|
|
|
|
expression irq;
|
|
|
|
position p != r1.p;
|
|
|
|
@@
|
|
|
|
request_threaded_irq@p(irq, NULL, ...)
|
|
|
|
|
|
|
|
@script:python depends on org@
|
|
|
|
p << match.p;
|
|
|
|
@@
|
|
|
|
msg = "ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT"
|
|
|
|
coccilib.org.print_todo(p[0],msg)
|
|
|
|
|
|
|
|
@script:python depends on report@
|
|
|
|
p << match.p;
|
|
|
|
@@
|
|
|
|
msg = "ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT"
|
|
|
|
coccilib.report.print_report(p[0],msg)
|