Re: [cocci] [PATCH 1/3] coccinelle: mini_lock: improve performance when searching loops
From: Julia Lawall
Date: Sun Jul 26 2026 - 10:14:28 EST
On Sun, 26 Jul 2026, Markus Elfring wrote:
> …
> > +++ b/scripts/coccinelle/locks/mini_lock.cocci
> > @@ -53,11 +53,31 @@ spin_lock_irq@p1
> > spin_lock_irqsave@p1
> > ) (E1@p,...);
> >
> > -@looped@
> > +@err_candidate exists@
> > +expression E1;
> > +position prelocked.p;
> > +position up != prelocked.p1;
> > +position rc;
> …
>
> Can it help a bit to avoid the repetition of the type
> for a few metavariables?
>
> +position prelocked.p, up != prelocked.p1, rc;
It's fine as is.
julia