Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-20 Thread Michal Marek
On Sun, Jun 12, 2016 at 11:45:57PM +0200, Julia Lawall wrote:
> 
> 
> On Sun, 12 Jun 2016, Nicolas Palix (LIG) wrote:
> 
> > Le 12/06/16 à 21:04, Deepa Dinamani a écrit :
> > > Documentation/coccinelle.txt suggests using the SPFLAGS
> > > make variable to pass additional options to spatch.
> > > 
> > > Reorder the way SPFLAGS is added to FLAGS, to allow
> > > for options in the SPFLAGS to override the default
> > > --very-quiet option.
> > > 
> > > Similarly, rearrage the FLAGS for org or report mode.
> > > This allows for overriding of the default --no-show-diff
> > > option through SPFLAGS.
> > > 
> > > Signed-off-by: Deepa Dinamani 
> > > Cc: Julia Lawall 
> > > Cc: Gilles Muller 
> > > Cc: Nicolas Palix 
> > Acked-By: Nicolas Palix 
> 
> Acked-by: Julia Lawall 

Applied to kbuild.git#misc.

Michal


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-20 Thread Michal Marek
On Sun, Jun 12, 2016 at 11:45:57PM +0200, Julia Lawall wrote:
> 
> 
> On Sun, 12 Jun 2016, Nicolas Palix (LIG) wrote:
> 
> > Le 12/06/16 à 21:04, Deepa Dinamani a écrit :
> > > Documentation/coccinelle.txt suggests using the SPFLAGS
> > > make variable to pass additional options to spatch.
> > > 
> > > Reorder the way SPFLAGS is added to FLAGS, to allow
> > > for options in the SPFLAGS to override the default
> > > --very-quiet option.
> > > 
> > > Similarly, rearrage the FLAGS for org or report mode.
> > > This allows for overriding of the default --no-show-diff
> > > option through SPFLAGS.
> > > 
> > > Signed-off-by: Deepa Dinamani 
> > > Cc: Julia Lawall 
> > > Cc: Gilles Muller 
> > > Cc: Nicolas Palix 
> > Acked-By: Nicolas Palix 
> 
> Acked-by: Julia Lawall 

Applied to kbuild.git#misc.

Michal


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Julia Lawall


On Sun, 12 Jun 2016, Nicolas Palix (LIG) wrote:

> Le 12/06/16 à 21:04, Deepa Dinamani a écrit :
> > Documentation/coccinelle.txt suggests using the SPFLAGS
> > make variable to pass additional options to spatch.
> > 
> > Reorder the way SPFLAGS is added to FLAGS, to allow
> > for options in the SPFLAGS to override the default
> > --very-quiet option.
> > 
> > Similarly, rearrage the FLAGS for org or report mode.
> > This allows for overriding of the default --no-show-diff
> > option through SPFLAGS.
> > 
> > Signed-off-by: Deepa Dinamani 
> > Cc: Julia Lawall 
> > Cc: Gilles Muller 
> > Cc: Nicolas Palix 
> Acked-By: Nicolas Palix 

Acked-by: Julia Lawall 

> > Cc: Michal Marek 
> > ---
> >  scripts/coccicheck | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/scripts/coccicheck b/scripts/coccicheck
> > index dd85a45..f662786 100755
> > --- a/scripts/coccicheck
> > +++ b/scripts/coccicheck
> > @@ -25,7 +25,7 @@ else
> > NPROC="$J"
> >  fi
> > 
> > -FLAGS="$SPFLAGS --very-quiet"
> > +FLAGS="--very-quiet $SPFLAGS"
> > 
> >  # spatch only allows include directories with the syntax "-I include"
> >  # while gcc also allows "-Iinclude" and "-include include"
> > @@ -72,7 +72,7 @@ if [ "$MODE" = "chain" ] ; then
> > echo 'All available modes will be tried (in that order): patch,
> > report, context, org'
> >  fi
> >  elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
> > -FLAGS="$FLAGS --no-show-diff"
> > +FLAGS="--no-show-diff $FLAGS"
> >  fi
> > 
> >  if [ "$ONLINE" = "0" ] ; then
> > 
> 
> 
> -- 
> Nicolas Palix
> http://lig-membres.imag.fr/palix/
> 
> 

Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Julia Lawall


On Sun, 12 Jun 2016, Nicolas Palix (LIG) wrote:

> Le 12/06/16 à 21:04, Deepa Dinamani a écrit :
> > Documentation/coccinelle.txt suggests using the SPFLAGS
> > make variable to pass additional options to spatch.
> > 
> > Reorder the way SPFLAGS is added to FLAGS, to allow
> > for options in the SPFLAGS to override the default
> > --very-quiet option.
> > 
> > Similarly, rearrage the FLAGS for org or report mode.
> > This allows for overriding of the default --no-show-diff
> > option through SPFLAGS.
> > 
> > Signed-off-by: Deepa Dinamani 
> > Cc: Julia Lawall 
> > Cc: Gilles Muller 
> > Cc: Nicolas Palix 
> Acked-By: Nicolas Palix 

Acked-by: Julia Lawall 

> > Cc: Michal Marek 
> > ---
> >  scripts/coccicheck | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/scripts/coccicheck b/scripts/coccicheck
> > index dd85a45..f662786 100755
> > --- a/scripts/coccicheck
> > +++ b/scripts/coccicheck
> > @@ -25,7 +25,7 @@ else
> > NPROC="$J"
> >  fi
> > 
> > -FLAGS="$SPFLAGS --very-quiet"
> > +FLAGS="--very-quiet $SPFLAGS"
> > 
> >  # spatch only allows include directories with the syntax "-I include"
> >  # while gcc also allows "-Iinclude" and "-include include"
> > @@ -72,7 +72,7 @@ if [ "$MODE" = "chain" ] ; then
> > echo 'All available modes will be tried (in that order): patch,
> > report, context, org'
> >  fi
> >  elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
> > -FLAGS="$FLAGS --no-show-diff"
> > +FLAGS="--no-show-diff $FLAGS"
> >  fi
> > 
> >  if [ "$ONLINE" = "0" ] ; then
> > 
> 
> 
> -- 
> Nicolas Palix
> http://lig-membres.imag.fr/palix/
> 
> 

Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Nicolas Palix (LIG)

Le 12/06/16 à 21:04, Deepa Dinamani a écrit :

Documentation/coccinelle.txt suggests using the SPFLAGS
make variable to pass additional options to spatch.

Reorder the way SPFLAGS is added to FLAGS, to allow
for options in the SPFLAGS to override the default
--very-quiet option.

Similarly, rearrage the FLAGS for org or report mode.
This allows for overriding of the default --no-show-diff
option through SPFLAGS.

Signed-off-by: Deepa Dinamani 
Cc: Julia Lawall 
Cc: Gilles Muller 
Cc: Nicolas Palix 

Acked-By: Nicolas Palix 

Cc: Michal Marek 
---
 scripts/coccicheck | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index dd85a45..f662786 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -25,7 +25,7 @@ else
NPROC="$J"
 fi

-FLAGS="$SPFLAGS --very-quiet"
+FLAGS="--very-quiet $SPFLAGS"

 # spatch only allows include directories with the syntax "-I include"
 # while gcc also allows "-Iinclude" and "-include include"
@@ -72,7 +72,7 @@ if [ "$MODE" = "chain" ] ; then
echo 'All available modes will be tried (in that order): patch, report, 
context, org'
 fi
 elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
-FLAGS="$FLAGS --no-show-diff"
+FLAGS="--no-show-diff $FLAGS"
 fi

 if [ "$ONLINE" = "0" ] ; then




--
Nicolas Palix
http://lig-membres.imag.fr/palix/



smime.p7s
Description: Signature cryptographique S/MIME


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Nicolas Palix (LIG)

Le 12/06/16 à 21:04, Deepa Dinamani a écrit :

Documentation/coccinelle.txt suggests using the SPFLAGS
make variable to pass additional options to spatch.

Reorder the way SPFLAGS is added to FLAGS, to allow
for options in the SPFLAGS to override the default
--very-quiet option.

Similarly, rearrage the FLAGS for org or report mode.
This allows for overriding of the default --no-show-diff
option through SPFLAGS.

Signed-off-by: Deepa Dinamani 
Cc: Julia Lawall 
Cc: Gilles Muller 
Cc: Nicolas Palix 

Acked-By: Nicolas Palix 

Cc: Michal Marek 
---
 scripts/coccicheck | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index dd85a45..f662786 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -25,7 +25,7 @@ else
NPROC="$J"
 fi

-FLAGS="$SPFLAGS --very-quiet"
+FLAGS="--very-quiet $SPFLAGS"

 # spatch only allows include directories with the syntax "-I include"
 # while gcc also allows "-Iinclude" and "-include include"
@@ -72,7 +72,7 @@ if [ "$MODE" = "chain" ] ; then
echo 'All available modes will be tried (in that order): patch, report, 
context, org'
 fi
 elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
-FLAGS="$FLAGS --no-show-diff"
+FLAGS="--no-show-diff $FLAGS"
 fi

 if [ "$ONLINE" = "0" ] ; then




--
Nicolas Palix
http://lig-membres.imag.fr/palix/



smime.p7s
Description: Signature cryptographique S/MIME


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Julia Lawall


On Sun, 12 Jun 2016, Deepa Dinamani wrote:

> >> >> Documentation/coccinelle.txt suggests using the SPFLAGS
> >> >> make variable to pass additional options to spatch.
> >> >>
> >> >> Reorder the way SPFLAGS is added to FLAGS, to allow
> >> >> for options in the SPFLAGS to override the default
> >> >> --very-quiet option.
> >> >>
> >> >> Similarly, rearrage the FLAGS for org or report mode.
> >> >> This allows for overriding of the default --no-show-diff
> >> >> option through SPFLAGS.
> >> >
> >> > The first looks like a good idea, but do you find a use case for the
> >> > second?  The diff that is shown in org or report mode may be sort of
> >> > random.  It is just an easy hack to reuse the same pattern code for
> >> > context, org, and report modes, but there isn't an intent to see the diff
> >> > produced by context mode in org or report mode.
> >>
> >> I thought this at first, that org report mode wouldn't need it the diff.
> >> But if a user wishes to override the option, then why should we not
> >> accept that the user knows what they are doing?
> >
> > I guess... Another issue is that the org/report mode output comes from
> > python, and the diff output comes from ocaml.  They are not synchronized.
> > Ie, the report won't come out next to the relevant diff.
> 
> Ok. I was just thinking of user as the final authority because I was
> trying to get more
> debug output for my script. And, yes I only wanted to override the 
> --very-quiet.
> I just thought since --no-show-diff was a similar issue, it would be
> good to do the
> same thing here.
> 
> Let me know if you want me to leave out the second rearrange and submit a v2.

I think it doesn't hurt anything, if Nicolas is OK with it.

Thanks for noticing the --very-quiet issue.

julia


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Julia Lawall


On Sun, 12 Jun 2016, Deepa Dinamani wrote:

> >> >> Documentation/coccinelle.txt suggests using the SPFLAGS
> >> >> make variable to pass additional options to spatch.
> >> >>
> >> >> Reorder the way SPFLAGS is added to FLAGS, to allow
> >> >> for options in the SPFLAGS to override the default
> >> >> --very-quiet option.
> >> >>
> >> >> Similarly, rearrage the FLAGS for org or report mode.
> >> >> This allows for overriding of the default --no-show-diff
> >> >> option through SPFLAGS.
> >> >
> >> > The first looks like a good idea, but do you find a use case for the
> >> > second?  The diff that is shown in org or report mode may be sort of
> >> > random.  It is just an easy hack to reuse the same pattern code for
> >> > context, org, and report modes, but there isn't an intent to see the diff
> >> > produced by context mode in org or report mode.
> >>
> >> I thought this at first, that org report mode wouldn't need it the diff.
> >> But if a user wishes to override the option, then why should we not
> >> accept that the user knows what they are doing?
> >
> > I guess... Another issue is that the org/report mode output comes from
> > python, and the diff output comes from ocaml.  They are not synchronized.
> > Ie, the report won't come out next to the relevant diff.
> 
> Ok. I was just thinking of user as the final authority because I was
> trying to get more
> debug output for my script. And, yes I only wanted to override the 
> --very-quiet.
> I just thought since --no-show-diff was a similar issue, it would be
> good to do the
> same thing here.
> 
> Let me know if you want me to leave out the second rearrange and submit a v2.

I think it doesn't hurt anything, if Nicolas is OK with it.

Thanks for noticing the --very-quiet issue.

julia


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Deepa Dinamani
>> >> Documentation/coccinelle.txt suggests using the SPFLAGS
>> >> make variable to pass additional options to spatch.
>> >>
>> >> Reorder the way SPFLAGS is added to FLAGS, to allow
>> >> for options in the SPFLAGS to override the default
>> >> --very-quiet option.
>> >>
>> >> Similarly, rearrage the FLAGS for org or report mode.
>> >> This allows for overriding of the default --no-show-diff
>> >> option through SPFLAGS.
>> >
>> > The first looks like a good idea, but do you find a use case for the
>> > second?  The diff that is shown in org or report mode may be sort of
>> > random.  It is just an easy hack to reuse the same pattern code for
>> > context, org, and report modes, but there isn't an intent to see the diff
>> > produced by context mode in org or report mode.
>>
>> I thought this at first, that org report mode wouldn't need it the diff.
>> But if a user wishes to override the option, then why should we not
>> accept that the user knows what they are doing?
>
> I guess... Another issue is that the org/report mode output comes from
> python, and the diff output comes from ocaml.  They are not synchronized.
> Ie, the report won't come out next to the relevant diff.

Ok. I was just thinking of user as the final authority because I was
trying to get more
debug output for my script. And, yes I only wanted to override the --very-quiet.
I just thought since --no-show-diff was a similar issue, it would be
good to do the
same thing here.

Let me know if you want me to leave out the second rearrange and submit a v2.

-Deepa


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Deepa Dinamani
>> >> Documentation/coccinelle.txt suggests using the SPFLAGS
>> >> make variable to pass additional options to spatch.
>> >>
>> >> Reorder the way SPFLAGS is added to FLAGS, to allow
>> >> for options in the SPFLAGS to override the default
>> >> --very-quiet option.
>> >>
>> >> Similarly, rearrage the FLAGS for org or report mode.
>> >> This allows for overriding of the default --no-show-diff
>> >> option through SPFLAGS.
>> >
>> > The first looks like a good idea, but do you find a use case for the
>> > second?  The diff that is shown in org or report mode may be sort of
>> > random.  It is just an easy hack to reuse the same pattern code for
>> > context, org, and report modes, but there isn't an intent to see the diff
>> > produced by context mode in org or report mode.
>>
>> I thought this at first, that org report mode wouldn't need it the diff.
>> But if a user wishes to override the option, then why should we not
>> accept that the user knows what they are doing?
>
> I guess... Another issue is that the org/report mode output comes from
> python, and the diff output comes from ocaml.  They are not synchronized.
> Ie, the report won't come out next to the relevant diff.

Ok. I was just thinking of user as the final authority because I was
trying to get more
debug output for my script. And, yes I only wanted to override the --very-quiet.
I just thought since --no-show-diff was a similar issue, it would be
good to do the
same thing here.

Let me know if you want me to leave out the second rearrange and submit a v2.

-Deepa


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Julia Lawall
On Sun, 12 Jun 2016, Deepa Dinamani wrote:

> >> Documentation/coccinelle.txt suggests using the SPFLAGS
> >> make variable to pass additional options to spatch.
> >>
> >> Reorder the way SPFLAGS is added to FLAGS, to allow
> >> for options in the SPFLAGS to override the default
> >> --very-quiet option.
> >>
> >> Similarly, rearrage the FLAGS for org or report mode.
> >> This allows for overriding of the default --no-show-diff
> >> option through SPFLAGS.
> >
> > The first looks like a good idea, but do you find a use case for the
> > second?  The diff that is shown in org or report mode may be sort of
> > random.  It is just an easy hack to reuse the same pattern code for
> > context, org, and report modes, but there isn't an intent to see the diff
> > produced by context mode in org or report mode.
> 
> I thought this at first, that org report mode wouldn't need it the diff.
> But if a user wishes to override the option, then why should we not
> accept that the user knows what they are doing?

I guess... Another issue is that the org/report mode output comes from 
python, and the diff output comes from ocaml.  They are not synchronized.  
Ie, the report won't come out next to the relevant diff.

julia


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Julia Lawall
On Sun, 12 Jun 2016, Deepa Dinamani wrote:

> >> Documentation/coccinelle.txt suggests using the SPFLAGS
> >> make variable to pass additional options to spatch.
> >>
> >> Reorder the way SPFLAGS is added to FLAGS, to allow
> >> for options in the SPFLAGS to override the default
> >> --very-quiet option.
> >>
> >> Similarly, rearrage the FLAGS for org or report mode.
> >> This allows for overriding of the default --no-show-diff
> >> option through SPFLAGS.
> >
> > The first looks like a good idea, but do you find a use case for the
> > second?  The diff that is shown in org or report mode may be sort of
> > random.  It is just an easy hack to reuse the same pattern code for
> > context, org, and report modes, but there isn't an intent to see the diff
> > produced by context mode in org or report mode.
> 
> I thought this at first, that org report mode wouldn't need it the diff.
> But if a user wishes to override the option, then why should we not
> accept that the user knows what they are doing?

I guess... Another issue is that the org/report mode output comes from 
python, and the diff output comes from ocaml.  They are not synchronized.  
Ie, the report won't come out next to the relevant diff.

julia


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Deepa Dinamani
>> Documentation/coccinelle.txt suggests using the SPFLAGS
>> make variable to pass additional options to spatch.
>>
>> Reorder the way SPFLAGS is added to FLAGS, to allow
>> for options in the SPFLAGS to override the default
>> --very-quiet option.
>>
>> Similarly, rearrage the FLAGS for org or report mode.
>> This allows for overriding of the default --no-show-diff
>> option through SPFLAGS.
>
> The first looks like a good idea, but do you find a use case for the
> second?  The diff that is shown in org or report mode may be sort of
> random.  It is just an easy hack to reuse the same pattern code for
> context, org, and report modes, but there isn't an intent to see the diff
> produced by context mode in org or report mode.

I thought this at first, that org report mode wouldn't need it the diff.
But if a user wishes to override the option, then why should we not
accept that the user knows what they are doing?

-Deepa


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Deepa Dinamani
>> Documentation/coccinelle.txt suggests using the SPFLAGS
>> make variable to pass additional options to spatch.
>>
>> Reorder the way SPFLAGS is added to FLAGS, to allow
>> for options in the SPFLAGS to override the default
>> --very-quiet option.
>>
>> Similarly, rearrage the FLAGS for org or report mode.
>> This allows for overriding of the default --no-show-diff
>> option through SPFLAGS.
>
> The first looks like a good idea, but do you find a use case for the
> second?  The diff that is shown in org or report mode may be sort of
> random.  It is just an easy hack to reuse the same pattern code for
> context, org, and report modes, but there isn't an intent to see the diff
> produced by context mode in org or report mode.

I thought this at first, that org report mode wouldn't need it the diff.
But if a user wishes to override the option, then why should we not
accept that the user knows what they are doing?

-Deepa


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Julia Lawall


On Sun, 12 Jun 2016, Deepa Dinamani wrote:

> Documentation/coccinelle.txt suggests using the SPFLAGS
> make variable to pass additional options to spatch.
> 
> Reorder the way SPFLAGS is added to FLAGS, to allow
> for options in the SPFLAGS to override the default
> --very-quiet option.
> 
> Similarly, rearrage the FLAGS for org or report mode.
> This allows for overriding of the default --no-show-diff
> option through SPFLAGS.

The first looks like a good idea, but do you find a use case for the 
second?  The diff that is shown in org or report mode may be sort of 
random.  It is just an easy hack to reuse the same pattern code for 
context, org, and report modes, but there isn't an intent to see the diff 
produced by context mode in org or report mode.

thanks,
julia


> Signed-off-by: Deepa Dinamani 
> Cc: Julia Lawall 
> Cc: Gilles Muller 
> Cc: Nicolas Palix 
> Cc: Michal Marek 
> ---
>  scripts/coccicheck | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index dd85a45..f662786 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -25,7 +25,7 @@ else
>   NPROC="$J"
>  fi
>  
> -FLAGS="$SPFLAGS --very-quiet"
> +FLAGS="--very-quiet $SPFLAGS"
>  
>  # spatch only allows include directories with the syntax "-I include"
>  # while gcc also allows "-Iinclude" and "-include include"
> @@ -72,7 +72,7 @@ if [ "$MODE" = "chain" ] ; then
>   echo 'All available modes will be tried (in that order): patch, report, 
> context, org'
>  fi
>  elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
> -FLAGS="$FLAGS --no-show-diff"
> +FLAGS="--no-show-diff $FLAGS"
>  fi
>  
>  if [ "$ONLINE" = "0" ] ; then
> -- 
> 1.9.1
> 
> 


Re: [PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Julia Lawall


On Sun, 12 Jun 2016, Deepa Dinamani wrote:

> Documentation/coccinelle.txt suggests using the SPFLAGS
> make variable to pass additional options to spatch.
> 
> Reorder the way SPFLAGS is added to FLAGS, to allow
> for options in the SPFLAGS to override the default
> --very-quiet option.
> 
> Similarly, rearrage the FLAGS for org or report mode.
> This allows for overriding of the default --no-show-diff
> option through SPFLAGS.

The first looks like a good idea, but do you find a use case for the 
second?  The diff that is shown in org or report mode may be sort of 
random.  It is just an easy hack to reuse the same pattern code for 
context, org, and report modes, but there isn't an intent to see the diff 
produced by context mode in org or report mode.

thanks,
julia


> Signed-off-by: Deepa Dinamani 
> Cc: Julia Lawall 
> Cc: Gilles Muller 
> Cc: Nicolas Palix 
> Cc: Michal Marek 
> ---
>  scripts/coccicheck | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index dd85a45..f662786 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -25,7 +25,7 @@ else
>   NPROC="$J"
>  fi
>  
> -FLAGS="$SPFLAGS --very-quiet"
> +FLAGS="--very-quiet $SPFLAGS"
>  
>  # spatch only allows include directories with the syntax "-I include"
>  # while gcc also allows "-Iinclude" and "-include include"
> @@ -72,7 +72,7 @@ if [ "$MODE" = "chain" ] ; then
>   echo 'All available modes will be tried (in that order): patch, report, 
> context, org'
>  fi
>  elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
> -FLAGS="$FLAGS --no-show-diff"
> +FLAGS="--no-show-diff $FLAGS"
>  fi
>  
>  if [ "$ONLINE" = "0" ] ; then
> -- 
> 1.9.1
> 
> 


[PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Deepa Dinamani
Documentation/coccinelle.txt suggests using the SPFLAGS
make variable to pass additional options to spatch.

Reorder the way SPFLAGS is added to FLAGS, to allow
for options in the SPFLAGS to override the default
--very-quiet option.

Similarly, rearrage the FLAGS for org or report mode.
This allows for overriding of the default --no-show-diff
option through SPFLAGS.

Signed-off-by: Deepa Dinamani 
Cc: Julia Lawall 
Cc: Gilles Muller 
Cc: Nicolas Palix 
Cc: Michal Marek 
---
 scripts/coccicheck | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index dd85a45..f662786 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -25,7 +25,7 @@ else
NPROC="$J"
 fi
 
-FLAGS="$SPFLAGS --very-quiet"
+FLAGS="--very-quiet $SPFLAGS"
 
 # spatch only allows include directories with the syntax "-I include"
 # while gcc also allows "-Iinclude" and "-include include"
@@ -72,7 +72,7 @@ if [ "$MODE" = "chain" ] ; then
echo 'All available modes will be tried (in that order): patch, report, 
context, org'
 fi
 elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
-FLAGS="$FLAGS --no-show-diff"
+FLAGS="--no-show-diff $FLAGS"
 fi
 
 if [ "$ONLINE" = "0" ] ; then
-- 
1.9.1



[PATCH] coccicheck: Allow for overriding spatch flags

2016-06-12 Thread Deepa Dinamani
Documentation/coccinelle.txt suggests using the SPFLAGS
make variable to pass additional options to spatch.

Reorder the way SPFLAGS is added to FLAGS, to allow
for options in the SPFLAGS to override the default
--very-quiet option.

Similarly, rearrage the FLAGS for org or report mode.
This allows for overriding of the default --no-show-diff
option through SPFLAGS.

Signed-off-by: Deepa Dinamani 
Cc: Julia Lawall 
Cc: Gilles Muller 
Cc: Nicolas Palix 
Cc: Michal Marek 
---
 scripts/coccicheck | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index dd85a45..f662786 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -25,7 +25,7 @@ else
NPROC="$J"
 fi
 
-FLAGS="$SPFLAGS --very-quiet"
+FLAGS="--very-quiet $SPFLAGS"
 
 # spatch only allows include directories with the syntax "-I include"
 # while gcc also allows "-Iinclude" and "-include include"
@@ -72,7 +72,7 @@ if [ "$MODE" = "chain" ] ; then
echo 'All available modes will be tried (in that order): patch, report, 
context, org'
 fi
 elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
-FLAGS="$FLAGS --no-show-diff"
+FLAGS="--no-show-diff $FLAGS"
 fi
 
 if [ "$ONLINE" = "0" ] ; then
-- 
1.9.1