From: Julia Lawall Date: Sun, 12 Nov 2017 15:02:18 +0000 (+0100) Subject: coccinelle: use exists to improve efficiency X-Git-Tag: v4.15-rc1~49^2~2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6851ba1a1b22ba2e0800002d531bf04ced22ec18;p=uclinux-h8%2Flinux.git coccinelle: use exists to improve efficiency This just needs to find any reassignment of the loop iterator, and doesn't need such a thing on all execution paths, so use exists on the first rule. Signed-off-by: Julia Lawall Signed-off-by: Masahiro Yamada --- diff --git a/scripts/coccinelle/iterators/list_entry_update.cocci b/scripts/coccinelle/iterators/list_entry_update.cocci index 873f444e7137..be6f9f1abb34 100644 --- a/scripts/coccinelle/iterators/list_entry_update.cocci +++ b/scripts/coccinelle/iterators/list_entry_update.cocci @@ -15,7 +15,7 @@ virtual context virtual org virtual report -@r@ +@r exists@ iterator name list_for_each_entry; expression x,E; position p1,p2;