From: "Jérémy Lefaure" <jeremy.lefaure@lse.epita.fr>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Michal Marek <mmarek@suse.com>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Nicolas Palix <nicolas.palix@imag.fr>,
cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] Coccinelle: array_size: report even if include is missing
Date: Fri, 29 Dec 2017 18:28:00 +0100 [thread overview]
Message-ID: <20171229182800.6c44a81e@jeremy-laptop> (raw)
In-Reply-To: <alpine.DEB.2.20.1709141320170.3185@hadrien>
Hi,
On Thu, 14 Sep 2017 13:21:13 +0200 (CEST)
Julia Lawall <julia.lawall@lip6.fr> wrote:
> On Wed, 13 Sep 2017, Jérémy Lefaure wrote:
>
> > Rule r does not depend on rule i (which is the include of
> > linux/kernel.h) so the output should not depend on i in
> > org and report mode.
> >
> > Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
>
> I guess that if the incude is missing, the person updating the code can
> always add it.
>
I don't see this patch upstream, is it lost somewhere or should I send
it to someone else ?
>
> > ---
> >
> > I have tested this patch in report mode on the file
> > drivers/staging/rtlwifi/phydm/rtl8822b/halhwimg8822b_rf.c which does not
> > use ARRAY_SIZE and does not include linux/kernel.h.
> >
> > scripts/coccinelle/misc/array_size.cocci | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/scripts/coccinelle/misc/array_size.cocci b/scripts/coccinelle/misc/array_size.cocci
> > index 6ec05710b017..09520f0941f0 100644
> > --- a/scripts/coccinelle/misc/array_size.cocci
> > +++ b/scripts/coccinelle/misc/array_size.cocci
> > @@ -72,13 +72,13 @@ position p;
> > (sizeof(E)@p /sizeof(T))
> > )
> >
> > -@script:python depends on i&&org@
> > +@script:python depends on org@
> > p << r.p;
> > @@
> >
> > coccilib.org.print_todo(p[0], "WARNING should use ARRAY_SIZE")
> >
> > -@script:python depends on i&&report@
> > +@script:python depends on report@
> > p << r.p;
> > @@
> >
> > --
> > 2.14.1
> >
> >
next prev parent reply other threads:[~2017-12-29 17:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 2:38 Jérémy Lefaure
2017-09-14 11:21 ` Julia Lawall
2017-12-29 17:28 ` Jérémy Lefaure [this message]
2017-12-29 17:49 ` Julia Lawall
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=20171229182800.6c44a81e@jeremy-laptop \
--to=jeremy.lefaure@lse.epita.fr \
--cc=Gilles.Muller@lip6.fr \
--cc=cocci@systeme.lip6.fr \
--cc=julia.lawall@lip6.fr \
--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®