[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1906281304470.2538@hadrien>
Date: Fri, 28 Jun 2019 13:07:51 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: Markus Elfring <Markus.Elfring@....de>
cc: Wen Yang <wen.yang99@....com.cn>, linux-kernel@...r.kernel.org,
Yi Wang <wang.yi59@....com.cn>,
Gilles Muller <Gilles.Muller@...6.fr>,
Nicolas Palix <nicolas.palix@...g.fr>,
Michal Marek <michal.lkml@...kovi.net>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
cocci@...teme.lip6.fr
Subject: Re: [PATCH v2] coccinelle: semantic code search for missing
of_node_put
> > +x = @p1\(of_find_all_nodes\|
>
> I would find this SmPL disjunction easier to read without the usage
> of extra backslashes.
>
> +x =
> +(of_…
> +|of_…
> +)@p1(...);
Did you actually test this? I doubt that a position metavariable can be
put on a ) of a disjunction.
> > +|
> > +return x;
> > +|
> > +return of_fwnode_handle(x);
>
> Can a nested SmPL disjunction be helpful at such places?
>
> +|return
> +(x
> +|of_fwnode_handle(x)
> +);
The original code is much more readable. The internal representation will
be the same.
> > + when != v4l2_async_notifier_add_fwnode_subdev(<...x...>)
>
> Would the specification variant “<+... x ...+>” be relevant
> for the parameter selection?
I'm indeed quite surprised that <...x...> would be accepted by the parser.
julia
Powered by blists - more mailing lists