]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blame - scripts/coccinelle/misc/irqf_oneshot.cocci
Merge branch 'drm-armada-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into...
[mirror_ubuntu-zesty-kernel.git] / scripts / coccinelle / misc / irqf_oneshot.cocci
CommitLineData
f1f45504
LPC
1/// Make sure threaded IRQs without a primary handler are always request with
2/// IRQF_ONESHOT
3///
4//
5// Confidence: Good
6// Comments:
7// Options: --no-includes
8
9virtual patch
10virtual context
11virtual org
12virtual report
13
14@r1@
2c2b913d 15expression dev;
f1f45504
LPC
16expression irq;
17expression thread_fn;
18expression flags;
19position p;
20@@
2c2b913d 21(
f1f45504
LPC
22request_threaded_irq@p(irq, NULL, thread_fn,
23(
24flags | IRQF_ONESHOT
25|
26IRQF_ONESHOT
27)
28, ...)
2c2b913d
VR
29|
30devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
31(
32flags | IRQF_ONESHOT
33|
34IRQF_ONESHOT
35)
36, ...)
37)
f1f45504
LPC
38
39@depends on patch@
2c2b913d 40expression dev;
f1f45504
LPC
41expression irq;
42expression thread_fn;
43expression flags;
44position p != r1.p;
45@@
2c2b913d 46(
f1f45504
LPC
47request_threaded_irq@p(irq, NULL, thread_fn,
48(
49-0
50+IRQF_ONESHOT
51|
52-flags
53+flags | IRQF_ONESHOT
54)
55, ...)
2c2b913d
VR
56|
57devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
58(
59-0
60+IRQF_ONESHOT
61|
62-flags
63+flags | IRQF_ONESHOT
64)
65, ...)
66)
f1f45504
LPC
67
68@depends on context@
69position p != r1.p;
70@@
71*request_threaded_irq@p(...)
72
73@match depends on report || org@
74expression irq;
75position p != r1.p;
76@@
77request_threaded_irq@p(irq, NULL, ...)
78
79@script:python depends on org@
80p << match.p;
81@@
82msg = "ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT"
83coccilib.org.print_todo(p[0],msg)
84
85@script:python depends on report@
86p << match.p;
87@@
88msg = "ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT"
89coccilib.report.print_report(p[0],msg)