UPSTREAM: Coccinelle: reduce rule applicability
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 30 Jan 2016 15:27:04 +0000 (16:27 +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: Id2705a31f11329132b5af54ba933c208a49557bd
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 8f551befa2269dc244bcfbcad795132f833cb71c)

scripts/coccinelle/misc/badty.cocci

index 2fc06fc71927ff069947b6a09279d3b8130a2b7e..481cf301ccfc3abf2b68c8dcc8b59612ed2e9841 100644 (file)
@@ -50,7 +50,7 @@ T **x;
 //  For org and report mode
 //----------------------------------------------------------
 
-@r disable sizeof_type_expr@
+@r depends on (org || report) disable sizeof_type_expr@
 type T;
 T **x;
 position p;