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


Groups > linux.kernel > #1230135 > unrolled thread

[PATCH] Coccinelle: remove incorrect -include option transformation

Started byAndrzej Hajda <a.hajda@samsung.com>
First post2015-09-22 14:50 +0200
Last post2015-09-22 15:10 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Coccinelle: remove incorrect -include option transformation Andrzej Hajda <a.hajda@samsung.com> - 2015-09-22 14:50 +0200
    Re: [PATCH] Coccinelle: remove incorrect -include option  transformation Julia Lawall <julia.lawall@lip6.fr> - 2015-09-22 15:00 +0200
      Re: [PATCH] Coccinelle: remove incorrect -include option transformation Andrzej Hajda <a.hajda@samsung.com> - 2015-09-22 15:20 +0200
        Re: [PATCH] Coccinelle: remove incorrect -include option  transformation Julia Lawall <julia.lawall@lip6.fr> - 2015-09-22 15:30 +0200
    Re: [PATCH] Coccinelle: remove incorrect -include option  transformation Julia Lawall <julia.lawall@lip6.fr> - 2015-09-22 15:10 +0200

#1230135 — [PATCH] Coccinelle: remove incorrect -include option transformation

FromAndrzej Hajda <a.hajda@samsung.com>
Date2015-09-22 14:50 +0200
Subject[PATCH] Coccinelle: remove incorrect -include option transformation
Message-ID<qbvbc-5BU-33@gated-at.bofh.it>
kbuild/gcc uses -include option to include files and -I to provide paths for
#include <> directive. The same is true for spatch.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 scripts/coccicheck | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index bbf901a..6d84b05 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -30,7 +30,6 @@ FLAGS="$SPFLAGS --very-quiet"
 # spatch only allows include directories with the syntax "-I include"
 # while gcc also allows "-Iinclude" and "-include include"
 COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
-COCCIINCLUDE=${COCCIINCLUDE//-include/-I}
 
 if [ "$C" = "1" -o "$C" = "2" ]; then
     ONLINE=1
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1230152 — Re: [PATCH] Coccinelle: remove incorrect -include option transformation

FromJulia Lawall <julia.lawall@lip6.fr>
Date2015-09-22 15:00 +0200
SubjectRe: [PATCH] Coccinelle: remove incorrect -include option transformation
Message-ID<qbvkT-5Nf-39@gated-at.bofh.it>
In reply to#1230135

On Tue, 22 Sep 2015, Andrzej Hajda wrote:

> kbuild/gcc uses -include option to include files and -I to provide paths for
> #include <> directive. The same is true for spatch.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>  scripts/coccicheck | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index bbf901a..6d84b05 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -30,7 +30,6 @@ FLAGS="$SPFLAGS --very-quiet"
>  # spatch only allows include directories with the syntax "-I include"
>  # while gcc also allows "-Iinclude" and "-include include"
>  COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
> -COCCIINCLUDE=${COCCIINCLUDE//-include/-I}

I'm not sure of the meaning of the above notation, nor what is the
intention.  Coccinelle does have a --include option, but it doesn't mean
the same thing as -I.  It is a way to have a file be included that is not
included according to the normal inclusion strategy.  For example, if a.h
includes b.h which includes c.h, and if one considers that c.h is really
important for having the right type information, but one doesn't want the
cost of including everything via --recursive-includes, then one could put
--include c.h.

julia


>
>  if [ "$C" = "1" -o "$C" = "2" ]; then
>      ONLINE=1
> --
> 1.9.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1230175

FromAndrzej Hajda <a.hajda@samsung.com>
Date2015-09-22 15:20 +0200
Message-ID<qbvEd-6p9-5@gated-at.bofh.it>
In reply to#1230152
On 09/22/2015 02:58 PM, Julia Lawall wrote:
>
> On Tue, 22 Sep 2015, Andrzej Hajda wrote:
>
>> kbuild/gcc uses -include option to include files and -I to provide paths for
>> #include <> directive. The same is true for spatch.
>>
>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>> ---
>>  scripts/coccicheck | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/scripts/coccicheck b/scripts/coccicheck
>> index bbf901a..6d84b05 100755
>> --- a/scripts/coccicheck
>> +++ b/scripts/coccicheck
>> @@ -30,7 +30,6 @@ FLAGS="$SPFLAGS --very-quiet"
>>  # spatch only allows include directories with the syntax "-I include"
>>  # while gcc also allows "-Iinclude" and "-include include"
>>  COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
>> -COCCIINCLUDE=${COCCIINCLUDE//-include/-I}
> I'm not sure of the meaning of the above notation, nor what is the
> intention.  Coccinelle does have a --include option, but it doesn't mean
> the same thing as -I.  It is a way to have a file be included that is not
> included according to the normal inclusion strategy.  For example, if a.h
> includes b.h which includes c.h, and if one considers that c.h is really
> important for having the right type information, but one doesn't want the
> cost of including everything via --recursive-includes, then one could put
> --include c.h.

This option has the same meaning for gcc.
But the patch is incorrect. It should be:

COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}

gcc option '-include' should be converted to spatch option '--include',
ie one minus should be added.

Regards
Andrzej


>
> julia
>
>
>>  if [ "$C" = "1" -o "$C" = "2" ]; then
>>      ONLINE=1
>> --
>> 1.9.1
>>
>>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1230192 — Re: [PATCH] Coccinelle: remove incorrect -include option transformation

FromJulia Lawall <julia.lawall@lip6.fr>
Date2015-09-22 15:30 +0200
SubjectRe: [PATCH] Coccinelle: remove incorrect -include option transformation
Message-ID<qbvNU-6Aq-37@gated-at.bofh.it>
In reply to#1230175

On Tue, 22 Sep 2015, Andrzej Hajda wrote:

> On 09/22/2015 02:58 PM, Julia Lawall wrote:
> >
> > On Tue, 22 Sep 2015, Andrzej Hajda wrote:
> >
> >> kbuild/gcc uses -include option to include files and -I to provide paths for
> >> #include <> directive. The same is true for spatch.
> >>
> >> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> >> ---
> >>  scripts/coccicheck | 1 -
> >>  1 file changed, 1 deletion(-)
> >>
> >> diff --git a/scripts/coccicheck b/scripts/coccicheck
> >> index bbf901a..6d84b05 100755
> >> --- a/scripts/coccicheck
> >> +++ b/scripts/coccicheck
> >> @@ -30,7 +30,6 @@ FLAGS="$SPFLAGS --very-quiet"
> >>  # spatch only allows include directories with the syntax "-I include"
> >>  # while gcc also allows "-Iinclude" and "-include include"
> >>  COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
> >> -COCCIINCLUDE=${COCCIINCLUDE//-include/-I}
> > I'm not sure of the meaning of the above notation, nor what is the
> > intention.  Coccinelle does have a --include option, but it doesn't mean
> > the same thing as -I.  It is a way to have a file be included that is not
> > included according to the normal inclusion strategy.  For example, if a.h
> > includes b.h which includes c.h, and if one considers that c.h is really
> > important for having the right type information, but one doesn't want the
> > cost of including everything via --recursive-includes, then one could put
> > --include c.h.
>
> This option has the same meaning for gcc.
> But the patch is incorrect. It should be:
>
> COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
>
> gcc option '-include' should be converted to spatch option '--include',
> ie one minus should be added.

OK, do you want to submit a patch for that?

thanks,
julia

>
> Regards
> Andrzej
>
>
> >
> > julia
> >
> >
> >>  if [ "$C" = "1" -o "$C" = "2" ]; then
> >>      ONLINE=1
> >> --
> >> 1.9.1
> >>
> >>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1230158 — Re: [PATCH] Coccinelle: remove incorrect -include option transformation

FromJulia Lawall <julia.lawall@lip6.fr>
Date2015-09-22 15:10 +0200
SubjectRe: [PATCH] Coccinelle: remove incorrect -include option transformation
Message-ID<qbvux-6dJ-7@gated-at.bofh.it>
In reply to#1230135

On Tue, 22 Sep 2015, Andrzej Hajda wrote:

> kbuild/gcc uses -include option to include files and -I to provide paths for
> #include <> directive. The same is true for spatch.

Nicolas, if you think this is OK, please ack it.

thanks,
julia

> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>  scripts/coccicheck | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index bbf901a..6d84b05 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -30,7 +30,6 @@ FLAGS="$SPFLAGS --very-quiet"
>  # spatch only allows include directories with the syntax "-I include"
>  # while gcc also allows "-Iinclude" and "-include include"
>  COCCIINCLUDE=${LINUXINCLUDE//-I/-I }
> -COCCIINCLUDE=${COCCIINCLUDE//-include/-I}
>
>  if [ "$C" = "1" -o "$C" = "2" ]; then
>      ONLINE=1
> --
> 1.9.1
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web