> > +@depends on context && r1@
>
> Will the use of a position variable be helpful here?

No.  There is no need to repeat the same check for each place where a
given type occurs.  If the type always looks the same, checking it once is
sufficient for all uses.

> > +  \(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
>
> Did you consider to handle the relevant function names by a metavariable
> instead of a SmPL disjunction?

If you put the names into the constraints of a metavariable there will be
no file filtering based on the function names and the semantic patch will
run more slowly.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to