aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle/locks/flags.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/coccinelle/locks/flags.cocci')
-rw-r--r--scripts/coccinelle/locks/flags.cocci12
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
12virtual org 12virtual org
13virtual report 13virtual report
14 14
15@r@ 15@r exists@
16expression lock1,lock2,flags; 16expression lock1,lock2,flags;
17position p1,p2; 17position p1,p2;
18@@ 18@@
@@ -39,7 +39,7 @@ read_lock_irqsave@p2(lock2,flags)
39write_lock_irqsave@p2(lock2,flags) 39write_lock_irqsave@p2(lock2,flags)
40) 40)
41 41
42@d@ 42@d exists@
43expression f <= r.flags; 43expression f <= r.flags;
44expression lock1,lock2,flags; 44expression lock1,lock2,flags;
45position r.p1, r.p2; 45position r.p1, r.p2;
@@ -76,5 +76,5 @@ p1 << r.p1;
76p2 << r.p2; 76p2 << r.p2;
77@@ 77@@
78 78
79msg="ERROR: nested lock+irqsave that reuses flags from %s." % (p1[0].line) 79msg="ERROR: nested lock+irqsave that reuses flags from line %s." % (p1[0].line)
80coccilib.report.print_report(p2[0], msg) 80coccilib.report.print_report(p2[0], msg)