diff options
Diffstat (limited to 'scripts/coccinelle/locks/flags.cocci')
-rw-r--r-- | scripts/coccinelle/locks/flags.cocci | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/coccinelle/locks/flags.cocci b/scripts/coccinelle/locks/flags.cocci index b4344d838097..1c4ffe6fd846 100644 --- a/scripts/coccinelle/locks/flags.cocci +++ b/scripts/coccinelle/locks/flags.cocci | |||
@@ -1,9 +1,9 @@ | |||
1 | /// Find nested lock+irqsave functions that use the same flags variables | 1 | /// Find nested lock+irqsave functions that use the same flags variables |
2 | /// | 2 | /// |
3 | // Confidence: High | 3 | // Confidence: High |
4 | // Copyright: (C) 2010 Nicolas Palix, DIKU. GPLv2. | 4 | // Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. |
5 | // Copyright: (C) 2010 Julia Lawall, DIKU. GPLv2. | 5 | // Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. |
6 | // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. | 6 | // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. |
7 | // URL: http://coccinelle.lip6.fr/ | 7 | // URL: http://coccinelle.lip6.fr/ |
8 | // Comments: | 8 | // Comments: |
9 | // Options: -no_includes -include_headers | 9 | // Options: -no_includes -include_headers |
@@ -12,7 +12,7 @@ virtual context | |||
12 | virtual org | 12 | virtual org |
13 | virtual report | 13 | virtual report |
14 | 14 | ||
15 | @r@ | 15 | @r exists@ |
16 | expression lock1,lock2,flags; | 16 | expression lock1,lock2,flags; |
17 | position p1,p2; | 17 | position p1,p2; |
18 | @@ | 18 | @@ |
@@ -39,7 +39,7 @@ read_lock_irqsave@p2(lock2,flags) | |||
39 | write_lock_irqsave@p2(lock2,flags) | 39 | write_lock_irqsave@p2(lock2,flags) |
40 | ) | 40 | ) |
41 | 41 | ||
42 | @d@ | 42 | @d exists@ |
43 | expression f <= r.flags; | 43 | expression f <= r.flags; |
44 | expression lock1,lock2,flags; | 44 | expression lock1,lock2,flags; |
45 | position r.p1, r.p2; | 45 | position r.p1, r.p2; |
@@ -76,5 +76,5 @@ p1 << r.p1; | |||
76 | p2 << r.p2; | 76 | p2 << r.p2; |
77 | @@ | 77 | @@ |
78 | 78 | ||
79 | msg="ERROR: nested lock+irqsave that reuses flags from %s." % (p1[0].line) | 79 | msg="ERROR: nested lock+irqsave that reuses flags from line %s." % (p1[0].line) |
80 | coccilib.report.print_report(p2[0], msg) | 80 | coccilib.report.print_report(p2[0], msg) |