* [PATCH] Coccinelle: remove incorrect -include option transformation
@ 2015-09-22 12:48 Andrzej Hajda
2015-09-22 12:58 ` Julia Lawall
2015-09-22 13:00 ` Julia Lawall
0 siblings, 2 replies; 8+ messages in thread
From: Andrzej Hajda @ 2015-09-22 12:48 UTC (permalink / raw)
To: linux-kernel
Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek,
moderated list:COCCINELLE/Semantic Patches (SmPL)
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Coccinelle: remove incorrect -include option transformation
2015-09-22 12:48 [PATCH] Coccinelle: remove incorrect -include option transformation Andrzej Hajda
@ 2015-09-22 12:58 ` Julia Lawall
2015-09-22 13:09 ` Andrzej Hajda
2015-09-22 13:00 ` Julia Lawall
1 sibling, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2015-09-22 12:58 UTC (permalink / raw)
To: Andrzej Hajda
Cc: linux-kernel, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek,
moderated list:COCCINELLE/Semantic Patches (SmPL)
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
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Coccinelle: remove incorrect -include option transformation
2015-09-22 12:48 [PATCH] Coccinelle: remove incorrect -include option transformation Andrzej Hajda
2015-09-22 12:58 ` Julia Lawall
@ 2015-09-22 13:00 ` Julia Lawall
1 sibling, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2015-09-22 13:00 UTC (permalink / raw)
To: Andrzej Hajda
Cc: linux-kernel, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
Gilles Muller, Nicolas Palix, Michal Marek,
moderated list:COCCINELLE/Semantic Patches (SmPL)
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
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Coccinelle: remove incorrect -include option transformation
2015-09-22 12:58 ` Julia Lawall
@ 2015-09-22 13:09 ` Andrzej Hajda
2015-09-22 13:15 ` [PATCH v2] Coccinelle: fix " Andrzej Hajda
2015-09-22 13:23 ` [PATCH] Coccinelle: remove " Julia Lawall
0 siblings, 2 replies; 8+ messages in thread
From: Andrzej Hajda @ 2015-09-22 13:09 UTC (permalink / raw)
To: Julia Lawall
Cc: linux-kernel, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
Gilles Muller, Nicolas Palix, Michal Marek,
moderated list:COCCINELLE/Semantic Patches (SmPL)
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
>>
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] Coccinelle: fix incorrect -include option transformation
2015-09-22 13:09 ` Andrzej Hajda
@ 2015-09-22 13:15 ` Andrzej Hajda
2015-09-22 13:27 ` Julia Lawall
2015-09-22 13:23 ` [PATCH] Coccinelle: remove " Julia Lawall
1 sibling, 1 reply; 8+ messages in thread
From: Andrzej Hajda @ 2015-09-22 13:15 UTC (permalink / raw)
To: linux-kernel
Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek,
moderated list:COCCINELLE/Semantic Patches (SmPL)
kbuild/gcc uses -include option to include files and -I to provide paths for
#include <> directive. In case of spatch latter option should be prefixed with
two -.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
scripts/coccicheck | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/coccicheck b/scripts/coccicheck
index bbf901a..b2d75818 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -30,7 +30,7 @@ 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}
+COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
if [ "$C" = "1" -o "$C" = "2" ]; then
ONLINE=1
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Coccinelle: remove incorrect -include option transformation
2015-09-22 13:09 ` Andrzej Hajda
2015-09-22 13:15 ` [PATCH v2] Coccinelle: fix " Andrzej Hajda
@ 2015-09-22 13:23 ` Julia Lawall
1 sibling, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2015-09-22 13:23 UTC (permalink / raw)
To: Andrzej Hajda
Cc: Julia Lawall, linux-kernel, Bartlomiej Zolnierkiewicz,
Marek Szyprowski, Gilles Muller, Nicolas Palix, Michal Marek,
moderated list:COCCINELLE/Semantic Patches (SmPL)
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
> >>
> >>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] Coccinelle: fix incorrect -include option transformation
2015-09-22 13:15 ` [PATCH v2] Coccinelle: fix " Andrzej Hajda
@ 2015-09-22 13:27 ` Julia Lawall
2015-10-26 20:34 ` Michal Marek
0 siblings, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2015-09-22 13:27 UTC (permalink / raw)
To: Andrzej Hajda
Cc: linux-kernel, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek,
moderated list:COCCINELLE/Semantic Patches (SmPL)
On Tue, 22 Sep 2015, Andrzej Hajda wrote:
> kbuild/gcc uses -include option to include files and -I to provide paths for
> #include <> directive. In case of spatch latter option should be prefixed with
> two -.
Acked-by: Julia Lawall <julia.lawall@lip6.fr
Thanks!
julia
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> scripts/coccicheck | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index bbf901a..b2d75818 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -30,7 +30,7 @@ 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}
> +COCCIINCLUDE=${COCCIINCLUDE// -include/ --include}
>
> if [ "$C" = "1" -o "$C" = "2" ]; then
> ONLINE=1
> --
> 1.9.1
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] Coccinelle: fix incorrect -include option transformation
2015-09-22 13:27 ` Julia Lawall
@ 2015-10-26 20:34 ` Michal Marek
0 siblings, 0 replies; 8+ messages in thread
From: Michal Marek @ 2015-10-26 20:34 UTC (permalink / raw)
To: Julia Lawall, Andrzej Hajda
Cc: linux-kernel, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
Gilles Muller, Nicolas Palix,
moderated list:COCCINELLE/Semantic Patches (SmPL)
Dne 22.9.2015 v 15:27 Julia Lawall napsal(a):
> On Tue, 22 Sep 2015, Andrzej Hajda wrote:
>
>> kbuild/gcc uses -include option to include files and -I to provide paths for
>> #include <> directive. In case of spatch latter option should be prefixed with
That hash sign in the comment was not nice :).
>> two -.
>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr
Applied to kbuild.git#misc.
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-10-26 20:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-22 12:48 [PATCH] Coccinelle: remove incorrect -include option transformation Andrzej Hajda
2015-09-22 12:58 ` Julia Lawall
2015-09-22 13:09 ` Andrzej Hajda
2015-09-22 13:15 ` [PATCH v2] Coccinelle: fix " Andrzej Hajda
2015-09-22 13:27 ` Julia Lawall
2015-10-26 20:34 ` Michal Marek
2015-09-22 13:23 ` [PATCH] Coccinelle: remove " Julia Lawall
2015-09-22 13:00 ` 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).