lkml.org 
[lkml]   [2017]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] coccinelle: use exists to improve efficiency
2017-11-13 0:02 GMT+09:00 Julia Lawall <julia.lawall@lip6.fr>:
> 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>
>
> ---
>
> diff --git a/scripts/coccinelle/iterators/list_entry_update.cocci b/scripts/coccinelle/iterators/list_entry_update.cocci
> index 873f444..be6f9f1 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;


Applied to linux-kbuild/misc. Thanks!


--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2017-11-15 15:32    [W:0.433 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site