[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1608060836010.3433@hadrien>
Date: Sat, 6 Aug 2016 08:40:22 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: SF Markus Elfring <elfring@...rs.sourceforge.net>
cc: Amitoj Kaur Chawla <amitoj1606@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Coccinelle <cocci@...teme.lip6.fr>,
Gilles Muller <Gilles.Muller@...6.fr>,
Michal Marek <mmarek@...e.com>,
Nicolas Palix <nicolas.palix@...g.fr>
Subject: Re: [PATCH v3] Coccinelle: Script to replace NULL test with IS_ERR
test for devm_ioremap_resource
On Sat, 6 Aug 2016, SF Markus Elfring wrote:
> > +@err depends on context || org || report@
> > +statement S;
> > +expression e;
> > +position j0;
>
> How do you think about to omit the number from this variable name?
>
>
> > +@@
> > +
> > + e = devm_ioremap_resource(...);
> > +* if (!e@j0) S
>
> Are there any more functions to consider for such a source code search pattern?
> How do you think about to use a function name list here?
How about getting this into the kernel, and then one can worry about
adding more functions later.
>
> > +// ----------------------------------------------------------------------------
>
> I suggest to omit such comment lines from this SmPL script.
These are introduced by spgen. Likewise for the numbers on the j
variables. The pattern j + number can even be useful, because it shows a
position variable that introduced to manage the different kinds of output,
rather than something that is intrinsic to the computation being
performed.
julia
>
> Regards,
> Markus
>
Powered by blists - more mailing lists