lkml.org 
[lkml]   [2016]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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
>

\
 
 \ /
  Last update: 2016-08-06 22:41    [W:0.186 / U:1.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site