Discussion:
[Cocci] [RESEND PATCH 1/1] Coccinelle: array_size: report even if include is missing
Jérémy Lefaure
2017-12-29 18:14:23 UTC
Permalink
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 <***@lse.epita.fr>
Acked-by: Julia Lawall <***@lip6.fr>
---

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
Julia Lawall
2017-12-29 18:22:29 UTC
Permalink
Post by 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.
---
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;
)
p << r.p;
@@
coccilib.org.print_todo(p[0], "WARNING should use ARRAY_SIZE")
p << r.p;
@@
--
2.14.1
Masahiro Yamada
2018-01-01 09:19:32 UTC
Permalink
Post by 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.
---
Applied to linux-kbuild/misc. Thanks!
--
Best Regards
Masahiro Yamada
Julia Lawall
2018-01-01 09:36:14 UTC
Permalink
Post by Masahiro Yamada
Post by 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.
---
Applied to linux-kbuild/misc. Thanks!
Thanks, and happy new year!

julia

Loading...