From: Julia Lawall <julia.lawall@lip6.fr>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Coccinelle <cocci@systeme.lip6.fr>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Michal Marek <mmarek@suse.com>,
Nicolas Palix <nicolas.palix@imag.fr>
Subject: Re: [PATCH v3] Coccinelle: Script to replace NULL test with IS_ERR test for devm_ioremap_resource
Date: Sat, 6 Aug 2016 08:40:22 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.10.1608060836010.3433@hadrien> (raw)
In-Reply-To: <0fc7f1af-b66d-3089-8c15-6cdc570ac159@users.sourceforge.net>
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
>
prev parent reply other threads:[~2016-08-06 20:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-06 5:15 Amitoj Kaur Chawla
2016-08-06 6:30 ` SF Markus Elfring
2016-08-06 6:40 ` Julia Lawall [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.10.1608060836010.3433@hadrien \
--to=julia.lawall@lip6.fr \
--cc=Gilles.Muller@lip6.fr \
--cc=amitoj1606@gmail.com \
--cc=cocci@systeme.lip6.fr \
--cc=elfring@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.com \
--cc=nicolas.palix@imag.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®