* [PATCH 1/1] Coccinelle: array_size: report even if include is missing
@ 2017-09-14 2:38 Jérémy Lefaure
2017-09-14 11:21 ` Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Jérémy Lefaure @ 2017-09-14 2:38 UTC (permalink / raw)
To: Julia Lawall, Michal Marek, Gilles Muller, Nicolas Palix
Cc: cocci, linux-kernel, Jérémy Lefaure
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Coccinelle: array_size: report even if include is missing
2017-09-14 2:38 [PATCH 1/1] Coccinelle: array_size: report even if include is missing Jérémy Lefaure
@ 2017-09-14 11:21 ` Julia Lawall
2017-12-29 17:28 ` Jérémy Lefaure
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2017-09-14 11:21 UTC (permalink / raw)
To: Jérémy Lefaure
Cc: Michal Marek, Gilles Muller, Nicolas Palix, cocci, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]
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 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
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Coccinelle: array_size: report even if include is missing
2017-09-14 11:21 ` Julia Lawall
@ 2017-12-29 17:28 ` Jérémy Lefaure
2017-12-29 17:49 ` Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Jérémy Lefaure @ 2017-12-29 17:28 UTC (permalink / raw)
To: Julia Lawall
Cc: Michal Marek, Gilles Muller, Nicolas Palix, cocci, linux-kernel
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
> >
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] Coccinelle: array_size: report even if include is missing
2017-12-29 17:28 ` Jérémy Lefaure
@ 2017-12-29 17:49 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2017-12-29 17:49 UTC (permalink / raw)
To: Jérémy Lefaure
Cc: Gilles Muller, Nicolas Palix, cocci, linux-kernel,
Masahiro Yamada, Michal Marek
[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]
On Fri, 29 Dec 2017, Jérémy Lefaure wrote:
> 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 ?
Please send it again, including everyone in the above email list. Sorry
for the inconvenience and thanks for following up on it.
julia
>
>
> >
> > > ---
> > >
> > > 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
> > >
> > >
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-29 17:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14 2:38 [PATCH 1/1] Coccinelle: array_size: report even if include is missing Jérémy Lefaure
2017-09-14 11:21 ` Julia Lawall
2017-12-29 17:28 ` Jérémy Lefaure
2017-12-29 17:49 ` Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).