From 6851ba1a1b22ba2e0800002d531bf04ced22ec18 Mon Sep 17 00:00:00 2001
From: Julia Lawall <Julia.Lawall@lip6.fr>
Date: Sun, 12 Nov 2017 16:02:18 +0100
Subject: [PATCH] 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 <julia.lawall@lip6.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
 scripts/coccinelle/iterators/list_entry_update.cocci | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;