UPSTREAM: coccinelle: bugon: reduce rule applicability
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 3 Feb 2016 18:05:46 +0000 (19:05 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 12 Jul 2017 13:17:10 +0000 (21:17 +0800)
Rule r is only use in org or report mode, so only execute it in those
cases.

Change-Id: If04125246bc21159b37d41c67a5b2556ec8ede3a
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit f75621c6ecadbd1802a7142fd346511cea05250a)

scripts/coccinelle/misc/bugon.cocci

index 27c97f1f2767f6145349752e0500b1c87ad6052e..741586094abe08be1ebea5c81ad57e4c5ff066fa 100644 (file)
@@ -40,7 +40,7 @@ expression e;
 //  For org and report mode
 //----------------------------------------------------------
 
-@r@
+@r depends on (org || report)@
 expression e;
 position p;
 @@