Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1732024 > unrolled thread

[PATCH 1/1] Coccinelle: array_size: report even if include is missing

Started byJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
First post2017-09-14 05:00 +0200
Last post2017-09-14 13:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] Coccinelle: array_size: report even if include is missing Jérémy Lefaure          <jeremy.lefaure@lse.epita.fr> - 2017-09-14 05:00 +0200
    Re: [PATCH 1/1] Coccinelle: array_size: report even if include is  missing Julia Lawall <julia.lawall@lip6.fr> - 2017-09-14 13:30 +0200

#1732024 — [PATCH 1/1] Coccinelle: array_size: report even if include is missing

FromJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Date2017-09-14 05:00 +0200
Subject[PATCH 1/1] Coccinelle: array_size: report even if include is missing
Message-ID<upsxI-7uE-7@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1732224 — Re: [PATCH 1/1] Coccinelle: array_size: report even if include is missing

FromJulia Lawall <julia.lawall@lip6.fr>
Date2017-09-14 13:30 +0200
SubjectRe: [PATCH 1/1] Coccinelle: array_size: report even if include is missing
Message-ID<upAvf-4nM-13@gated-at.bofh.it>
In reply to#1732024

[Multipart message — attachments visible in raw view] — view raw

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
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web