UPSTREAM: Coccinelle: array_size: reduce rule applicability
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 30 Jan 2016 16:13:54 +0000 (17:13 +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: I00224a5dda297070e31defd650247261e08dc830
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 c7eaa8873b3e50667e0b6529141139147f34748e)

scripts/coccinelle/misc/array_size.cocci

index 81e279cd347b117e04258f330c99bbe590813bd9..6ec05710b0179463101feddc99498196f740255a 100644 (file)
@@ -59,7 +59,7 @@ T[] E;
 //  For org and report mode
 //----------------------------------------------------------
 
-@r@
+@r depends on (org || report)@
 type T;
 T[] E;
 position p;