UPSTREAM: Coccinelle: pm_runtime: reduce rule applicability
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 31 Jan 2016 16:26:57 +0000 (17:26 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 12 Jul 2017 13:17:10 +0000 (21:17 +0800)
Rule r is only used in org or report mode, so only execute it in those
cases.

Change-Id: Ib2311a33fca6544b885bbf44b9695e1984680f96
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 79ff2b3deae7db21e73f1e0add92c988135defd2)

scripts/coccinelle/api/pm_runtime.cocci

index b7042d074078cbb2883f560df119b53fc4e39cae..89b98a2f7a6f46d74863701ed49f8f60455731ed 100644 (file)
@@ -78,7 +78,7 @@ ret = pm_runtime_api(...);
 //  For org and report mode
 //----------------------------------------------------------
 
-@r depends on runtime_bad_err_handle exists@
+@r depends on runtime_bad_err_handle && (org || report) exists@
 position p1, p2;
 identifier pm_runtime_api;
 expression ret;