All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] coccicheck: use $KBUILD_EXTMOD when available
@ 2010-07-03 15:20 ` Kulikov Vasiliy
  0 siblings, 0 replies; 12+ messages in thread
From: Kulikov Vasiliy @ 2010-07-03 15:20 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
to use make M=somedir.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 scripts/coccicheck |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index b8bcf1f..7d66a55 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -1,5 +1,11 @@
 #!/bin/sh
 
+if [ -n "$KBUILD_EXTMOD" ]; then
+	CHECK_DIR="$KBUILD_EXTMOD"
+else
+	CHECK_DIR="$srctree"
+fi
+
 SPATCH="`which ${SPATCH:=spatch}`"
 
 if [ "$C" = "1" -o "$C" = "2" ]; then
@@ -64,7 +70,7 @@ coccinelle () {
 	echo ' http://coccinelle.lip6.fr/'
 	echo ''
 
-	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
+	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
     else
 	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
     fi
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] coccicheck: use $KBUILD_EXTMOD when available
@ 2010-07-03 15:20 ` Kulikov Vasiliy
  0 siblings, 0 replies; 12+ messages in thread
From: Kulikov Vasiliy @ 2010-07-03 15:20 UTC (permalink / raw)
  To: Kernel Janitors
  Cc: Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
to use make M=somedir.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
 scripts/coccicheck |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index b8bcf1f..7d66a55 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -1,5 +1,11 @@
 #!/bin/sh
 
+if [ -n "$KBUILD_EXTMOD" ]; then
+	CHECK_DIR="$KBUILD_EXTMOD"
+else
+	CHECK_DIR="$srctree"
+fi
+
 SPATCH="`which ${SPATCH:=spatch}`"
 
 if [ "$C" = "1" -o "$C" = "2" ]; then
@@ -64,7 +70,7 @@ coccinelle () {
 	echo ' http://coccinelle.lip6.fr/'
 	echo ''
 
-	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
+	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
     else
 	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
     fi
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
  2010-07-03 15:20 ` Kulikov Vasiliy
@ 2010-07-03 19:49   ` Nicolas Palix
  -1 siblings, 0 replies; 12+ messages in thread
From: Nicolas Palix @ 2010-07-03 19:49 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: Kernel Janitors, Julia Lawall, Gilles Muller, Michal Marek,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

Hi,

On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
> Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
> to use make M=somedir.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  scripts/coccicheck |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index b8bcf1f..7d66a55 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -1,5 +1,11 @@
>  #!/bin/sh
>  
> +if [ -n "$KBUILD_EXTMOD" ]; then
> +	CHECK_DIR="$KBUILD_EXTMOD"
> +else
> +	CHECK_DIR="$srctree"
> +fi
> +
>  SPATCH="`which ${SPATCH:=spatch}`"
>  
>  if [ "$C" = "1" -o "$C" = "2" ]; then
> @@ -64,7 +70,7 @@ coccinelle () {
>  	echo ' http://coccinelle.lip6.fr/'
>  	echo ''
>  
> -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
> +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
>      else
>  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
>      fi
> 

In doing so, the output of the patch mode will produce patches relative to $KBUILD_EXTMOD.
I am not sure of what most of developers want but if the patches must be relative to
the Linux kernel root, the following patch must be used.

Any preference ?


diff --git a/scripts/coccicheck b/scripts/coccicheck
index b8bcf1f..cda66a3 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -1,5 +1,12 @@
 #!/bin/sh
 
+if [ -n "$KBUILD_EXTMOD" ]; then
+       CHECK_DIR="$srctree/$KBUILD_EXTMOD"
+       FLAGS="-patch $srctree"
+else
+       CHECK_DIR="$srctree"
+fi
+
 SPATCH="`which ${SPATCH:=spatch}`"
 
 if [ "$C" = "1" -o "$C" = "2" ]; then
@@ -10,12 +17,12 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
 #    OPTIONS=$*
 
 # Workaround for Coccinelle < 0.2.3
-    FLAGS="-I $srctree/include -very_quiet"
+    FLAGS="-I $srctree/include -very_quiet $FLAGS"
     shift $(( $# - 1 ))
     OPTIONS=$1
 else
     ONLINE=0
-    FLAGS="-very_quiet"
+    FLAGS="-very_quiet $FLAGS"
 fi
 
 if [ ! -x "$SPATCH" ]; then
@@ -64,7 +71,7 @@ coccinelle () {
        echo ' http://coccinelle.lip6.fr/'
        echo ''
 
-       $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
+       $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
     else
        $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
     fi

--
Nicolas Palix
Web: http://www.diku.dk/~npalix/

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
@ 2010-07-03 19:49   ` Nicolas Palix
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Palix @ 2010-07-03 19:49 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: Kernel Janitors, Julia Lawall, Gilles Muller, Michal Marek,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

Hi,

On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
> Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
> to use make M=somedir.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  scripts/coccicheck |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index b8bcf1f..7d66a55 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -1,5 +1,11 @@
>  #!/bin/sh
>  
> +if [ -n "$KBUILD_EXTMOD" ]; then
> +	CHECK_DIR="$KBUILD_EXTMOD"
> +else
> +	CHECK_DIR="$srctree"
> +fi
> +
>  SPATCH="`which ${SPATCH:=spatch}`"
>  
>  if [ "$C" = "1" -o "$C" = "2" ]; then
> @@ -64,7 +70,7 @@ coccinelle () {
>  	echo ' http://coccinelle.lip6.fr/'
>  	echo ''
>  
> -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
> +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
>      else
>  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
>      fi
> 

In doing so, the output of the patch mode will produce patches relative to $KBUILD_EXTMOD.
I am not sure of what most of developers want but if the patches must be relative to
the Linux kernel root, the following patch must be used.

Any preference ?


diff --git a/scripts/coccicheck b/scripts/coccicheck
index b8bcf1f..cda66a3 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -1,5 +1,12 @@
 #!/bin/sh
 
+if [ -n "$KBUILD_EXTMOD" ]; then
+       CHECK_DIR="$srctree/$KBUILD_EXTMOD"
+       FLAGS="-patch $srctree"
+else
+       CHECK_DIR="$srctree"
+fi
+
 SPATCH="`which ${SPATCH:=spatch}`"
 
 if [ "$C" = "1" -o "$C" = "2" ]; then
@@ -10,12 +17,12 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
 #    OPTIONS=$*
 
 # Workaround for Coccinelle < 0.2.3
-    FLAGS="-I $srctree/include -very_quiet"
+    FLAGS="-I $srctree/include -very_quiet $FLAGS"
     shift $(( $# - 1 ))
     OPTIONS=$1
 else
     ONLINE=0
-    FLAGS="-very_quiet"
+    FLAGS="-very_quiet $FLAGS"
 fi
 
 if [ ! -x "$SPATCH" ]; then
@@ -64,7 +71,7 @@ coccinelle () {
        echo ' http://coccinelle.lip6.fr/'
        echo ''
 
-       $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
+       $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
     else
        $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
     fi

--
Nicolas Palix
Web: http://www.diku.dk/~npalix/

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
  2010-07-03 19:49   ` Nicolas Palix
@ 2010-07-04  8:41     ` Kulikov Vasiliy
  -1 siblings, 0 replies; 12+ messages in thread
From: Kulikov Vasiliy @ 2010-07-04  8:41 UTC (permalink / raw)
  To: Nicolas Palix
  Cc: Kernel Janitors, Julia Lawall, Gilles Muller, Michal Marek,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

Hi,

On Sat, Jul 03, 2010 at 21:49 +0200, Nicolas Palix wrote:
> Hi,
> 
> On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
> > Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
> > to use make M=somedir.
> > 
> > Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> > ---
> >  scripts/coccicheck |    8 +++++++-
> >  1 files changed, 7 insertions(+), 1 deletions(-)
> > 
> > diff --git a/scripts/coccicheck b/scripts/coccicheck
> > index b8bcf1f..7d66a55 100755
> > --- a/scripts/coccicheck
> > +++ b/scripts/coccicheck
> > @@ -1,5 +1,11 @@
> >  #!/bin/sh
> >  
> > +if [ -n "$KBUILD_EXTMOD" ]; then
> > +	CHECK_DIR="$KBUILD_EXTMOD"
> > +else
> > +	CHECK_DIR="$srctree"
> > +fi
> > +
> >  SPATCH="`which ${SPATCH:=spatch}`"
> >  
> >  if [ "$C" = "1" -o "$C" = "2" ]; then
> > @@ -64,7 +70,7 @@ coccinelle () {
> >  	echo ' http://coccinelle.lip6.fr/'
> >  	echo ''
> >  
> > -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
> > +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
> >      else
> >  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
> >      fi
> > 
> 
> In doing so, the output of the patch mode will produce patches relative to $KBUILD_EXTMOD.
> I am not sure of what most of developers want but if the patches must be relative to
> the Linux kernel root, the following patch must be used.
> 
> Any preference ?
> 
> 
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index b8bcf1f..cda66a3 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -1,5 +1,12 @@
>  #!/bin/sh
>  
> +if [ -n "$KBUILD_EXTMOD" ]; then
> +       CHECK_DIR="$srctree/$KBUILD_EXTMOD"
> +       FLAGS="-patch $srctree"

$KBUILD_EXTMOD may be fullpath, e.g.:

make -C ../../.. M=$PWD
                 ^^^^^^
So, I've got an error:
ERROR: File /home/vasya/dev/linux-next//home/vasya/linux/drivers/staging/sep does not exist: No such file or directory


With 

CHECK_DIR="$KBUILD_EXTMOD"
FLAGS="-patch $srctree"

I've got such diff lines:
--- /home/vasya/linux/drivers/staging/spectra/flash.c   2010-07-02 17:38:48.764253994 +0400
+++ /tmp/nothing

It is not good too.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
@ 2010-07-04  8:41     ` Kulikov Vasiliy
  0 siblings, 0 replies; 12+ messages in thread
From: Kulikov Vasiliy @ 2010-07-04  8:41 UTC (permalink / raw)
  To: Nicolas Palix
  Cc: Kernel Janitors, Julia Lawall, Gilles Muller, Michal Marek,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

Hi,

On Sat, Jul 03, 2010 at 21:49 +0200, Nicolas Palix wrote:
> Hi,
> 
> On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
> > Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
> > to use make M=somedir.
> > 
> > Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> > ---
> >  scripts/coccicheck |    8 +++++++-
> >  1 files changed, 7 insertions(+), 1 deletions(-)
> > 
> > diff --git a/scripts/coccicheck b/scripts/coccicheck
> > index b8bcf1f..7d66a55 100755
> > --- a/scripts/coccicheck
> > +++ b/scripts/coccicheck
> > @@ -1,5 +1,11 @@
> >  #!/bin/sh
> >  
> > +if [ -n "$KBUILD_EXTMOD" ]; then
> > +	CHECK_DIR="$KBUILD_EXTMOD"
> > +else
> > +	CHECK_DIR="$srctree"
> > +fi
> > +
> >  SPATCH="`which ${SPATCH:=spatch}`"
> >  
> >  if [ "$C" = "1" -o "$C" = "2" ]; then
> > @@ -64,7 +70,7 @@ coccinelle () {
> >  	echo ' http://coccinelle.lip6.fr/'
> >  	echo ''
> >  
> > -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
> > +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
> >      else
> >  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
> >      fi
> > 
> 
> In doing so, the output of the patch mode will produce patches relative to $KBUILD_EXTMOD.
> I am not sure of what most of developers want but if the patches must be relative to
> the Linux kernel root, the following patch must be used.
> 
> Any preference ?
> 
> 
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index b8bcf1f..cda66a3 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -1,5 +1,12 @@
>  #!/bin/sh
>  
> +if [ -n "$KBUILD_EXTMOD" ]; then
> +       CHECK_DIR="$srctree/$KBUILD_EXTMOD"
> +       FLAGS="-patch $srctree"

$KBUILD_EXTMOD may be fullpath, e.g.:

make -C ../../.. M=$PWD
                 ^^^^^^
So, I've got an error:
ERROR: File /home/vasya/dev/linux-next//home/vasya/linux/drivers/staging/sep does not exist: No such file or directory


With 

CHECK_DIR="$KBUILD_EXTMOD"
FLAGS="-patch $srctree"

I've got such diff lines:
--- /home/vasya/linux/drivers/staging/spectra/flash.c   2010-07-02 17:38:48.764253994 +0400
+++ /tmp/nothing

It is not good too.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
  2010-07-03 15:20 ` Kulikov Vasiliy
@ 2010-07-05 12:48   ` Nicolas Palix
  -1 siblings, 0 replies; 12+ messages in thread
From: Nicolas Palix @ 2010-07-05 12:48 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: Kernel Janitors, Julia Lawall, Gilles Muller, Michal Marek,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
> Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
> to use make M=somedir.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  scripts/coccicheck |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index b8bcf1f..7d66a55 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -1,5 +1,11 @@
>  #!/bin/sh
>  
> +if [ -n "$KBUILD_EXTMOD" ]; then
> +	CHECK_DIR="$KBUILD_EXTMOD"
> +else
> +	CHECK_DIR="$srctree"
> +fi
> +
>  SPATCH="`which ${SPATCH:=spatch}`"
>  
>  if [ "$C" = "1" -o "$C" = "2" ]; then
> @@ -64,7 +70,7 @@ coccinelle () {
>  	echo ' http://coccinelle.lip6.fr/'
>  	echo ''
>  
> -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
> +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
>      else
>  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
>      fi
> 

Acked-by: Nicolas Palix <npalix@diku.dk>

-- 
Nicolas Palix
Web: http://www.diku.dk/~npalix/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
@ 2010-07-05 12:48   ` Nicolas Palix
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Palix @ 2010-07-05 12:48 UTC (permalink / raw)
  To: Kulikov Vasiliy
  Cc: Kernel Janitors, Julia Lawall, Gilles Muller, Michal Marek,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
> Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
> to use make M=somedir.
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  scripts/coccicheck |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index b8bcf1f..7d66a55 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -1,5 +1,11 @@
>  #!/bin/sh
>  
> +if [ -n "$KBUILD_EXTMOD" ]; then
> +	CHECK_DIR="$KBUILD_EXTMOD"
> +else
> +	CHECK_DIR="$srctree"
> +fi
> +
>  SPATCH="`which ${SPATCH:=spatch}`"
>  
>  if [ "$C" = "1" -o "$C" = "2" ]; then
> @@ -64,7 +70,7 @@ coccinelle () {
>  	echo ' http://coccinelle.lip6.fr/'
>  	echo ''
>  
> -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
> +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
>      else
>  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
>      fi
> 

Acked-by: Nicolas Palix <npalix@diku.dk>

-- 
Nicolas Palix
Web: http://www.diku.dk/~npalix/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
  2010-07-03 19:49   ` Nicolas Palix
@ 2010-07-07 11:04     ` Michal Marek
  -1 siblings, 0 replies; 12+ messages in thread
From: Michal Marek @ 2010-07-07 11:04 UTC (permalink / raw)
  To: Nicolas Palix
  Cc: Kulikov Vasiliy, Kernel Janitors, Julia Lawall, Gilles Muller,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

On 3.7.2010 21:49, Nicolas Palix wrote:
> Hi,
> 
> On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
>> Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
>> to use make M=somedir.
>>
>> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
>> ---
>>  scripts/coccicheck |    8 +++++++-
>>  1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/scripts/coccicheck b/scripts/coccicheck
>> index b8bcf1f..7d66a55 100755
>> --- a/scripts/coccicheck
>> +++ b/scripts/coccicheck
>> @@ -1,5 +1,11 @@
>>  #!/bin/sh
>>  
>> +if [ -n "$KBUILD_EXTMOD" ]; then
>> +	CHECK_DIR="$KBUILD_EXTMOD"
>> +else
>> +	CHECK_DIR="$srctree"
>> +fi
>> +
>>  SPATCH="`which ${SPATCH:=spatch}`"
>>  
>>  if [ "$C" = "1" -o "$C" = "2" ]; then
>> @@ -64,7 +70,7 @@ coccinelle () {
>>  	echo ' http://coccinelle.lip6.fr/'
>>  	echo ''
>>  
>> -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
>> +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
>>      else
>>  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
>>      fi
>>
> 
> In doing so, the output of the patch mode will produce patches relative to $KBUILD_EXTMOD.
> I am not sure of what most of developers want but if the patches must be relative to
> the Linux kernel root, the following patch must be used.

If you are checking your out-of-tree module, then you're probably not
going to send the resulting patch to lkml.

Michal

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
@ 2010-07-07 11:04     ` Michal Marek
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Marek @ 2010-07-07 11:04 UTC (permalink / raw)
  To: Nicolas Palix
  Cc: Kulikov Vasiliy, Kernel Janitors, Julia Lawall, Gilles Muller,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

On 3.7.2010 21:49, Nicolas Palix wrote:
> Hi,
> 
> On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
>> Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
>> to use make M=somedir.
>>
>> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
>> ---
>>  scripts/coccicheck |    8 +++++++-
>>  1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/scripts/coccicheck b/scripts/coccicheck
>> index b8bcf1f..7d66a55 100755
>> --- a/scripts/coccicheck
>> +++ b/scripts/coccicheck
>> @@ -1,5 +1,11 @@
>>  #!/bin/sh
>>  
>> +if [ -n "$KBUILD_EXTMOD" ]; then
>> +	CHECK_DIR="$KBUILD_EXTMOD"
>> +else
>> +	CHECK_DIR="$srctree"
>> +fi
>> +
>>  SPATCH="`which ${SPATCH:=spatch}`"
>>  
>>  if [ "$C" = "1" -o "$C" = "2" ]; then
>> @@ -64,7 +70,7 @@ coccinelle () {
>>  	echo ' http://coccinelle.lip6.fr/'
>>  	echo ''
>>  
>> -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
>> +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
>>      else
>>  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
>>      fi
>>
> 
> In doing so, the output of the patch mode will produce patches relative to $KBUILD_EXTMOD.
> I am not sure of what most of developers want but if the patches must be relative to
> the Linux kernel root, the following patch must be used.

If you are checking your out-of-tree module, then you're probably not
going to send the resulting patch to lkml.

Michal

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
  2010-07-07 11:04     ` Michal Marek
@ 2010-07-07 12:22       ` Nicolas Palix
  -1 siblings, 0 replies; 12+ messages in thread
From: Nicolas Palix @ 2010-07-07 12:22 UTC (permalink / raw)
  To: Michal Marek
  Cc: Kulikov Vasiliy, Kernel Janitors, Julia Lawall, Gilles Muller,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

Hi,

On Wednesday 07 July 2010 13:04:36 Michal Marek wrote:
> On 3.7.2010 21:49, Nicolas Palix wrote:
> > Hi,
> > 
> > On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
> >> Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
> >> to use make M=somedir.
> >>
> >> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> >> ---
> >>  scripts/coccicheck |    8 +++++++-
> >>  1 files changed, 7 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/scripts/coccicheck b/scripts/coccicheck
> >> index b8bcf1f..7d66a55 100755
> >> --- a/scripts/coccicheck
> >> +++ b/scripts/coccicheck
> >> @@ -1,5 +1,11 @@
> >>  #!/bin/sh
> >>  
> >> +if [ -n "$KBUILD_EXTMOD" ]; then
> >> +	CHECK_DIR="$KBUILD_EXTMOD"
> >> +else
> >> +	CHECK_DIR="$srctree"
> >> +fi
> >> +
> >>  SPATCH="`which ${SPATCH:=spatch}`"
> >>  
> >>  if [ "$C" = "1" -o "$C" = "2" ]; then
> >> @@ -64,7 +70,7 @@ coccinelle () {
> >>  	echo ' http://coccinelle.lip6.fr/'
> >>  	echo ''
> >>  
> >> -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
> >> +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
> >>      else
> >>  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
> >>      fi
> >>
> > 
> > In doing so, the output of the patch mode will produce patches relative to $KBUILD_EXTMOD.
> > I am not sure of what most of developers want but if the patches must be relative to
> > the Linux kernel root, the following patch must be used.
> 
> If you are checking your out-of-tree module, then you're probably not
> going to send the resulting patch to lkml.
> 

Indeed. I thus acked the original patch last Monday [1].

Thanks.

[1] http://lkml.org/lkml/2010/7/5/136

> Michal
> 

-- 
Nicolas Palix
Tel: (+33) 1 44 27 87 25
Tel: (+33) 6 81 07 91 72
Web: http://www.diku.dk/~npalix/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] coccicheck: use $KBUILD_EXTMOD when available
@ 2010-07-07 12:22       ` Nicolas Palix
  0 siblings, 0 replies; 12+ messages in thread
From: Nicolas Palix @ 2010-07-07 12:22 UTC (permalink / raw)
  To: Michal Marek
  Cc: Kulikov Vasiliy, Kernel Janitors, Julia Lawall, Gilles Muller,
	Sam Ravnborg, Joerg Roedel, cocci, linux-kernel

Hi,

On Wednesday 07 July 2010 13:04:36 Michal Marek wrote:
> On 3.7.2010 21:49, Nicolas Palix wrote:
> > Hi,
> > 
> > On Saturday 03 July 2010 17:20:34 Kulikov Vasiliy wrote:
> >> Use $KBUILD_EXTMOD instead of $srctree when the latter is not null
> >> to use make M=somedir.
> >>
> >> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> >> ---
> >>  scripts/coccicheck |    8 +++++++-
> >>  1 files changed, 7 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/scripts/coccicheck b/scripts/coccicheck
> >> index b8bcf1f..7d66a55 100755
> >> --- a/scripts/coccicheck
> >> +++ b/scripts/coccicheck
> >> @@ -1,5 +1,11 @@
> >>  #!/bin/sh
> >>  
> >> +if [ -n "$KBUILD_EXTMOD" ]; then
> >> +	CHECK_DIR="$KBUILD_EXTMOD"
> >> +else
> >> +	CHECK_DIR="$srctree"
> >> +fi
> >> +
> >>  SPATCH="`which ${SPATCH:=spatch}`"
> >>  
> >>  if [ "$C" = "1" -o "$C" = "2" ]; then
> >> @@ -64,7 +70,7 @@ coccinelle () {
> >>  	echo ' http://coccinelle.lip6.fr/'
> >>  	echo ''
> >>  
> >> -	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $srctree || exit 1
> >> +	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT -dir $CHECK_DIR || exit 1
> >>      else
> >>  	$SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
> >>      fi
> >>
> > 
> > In doing so, the output of the patch mode will produce patches relative to $KBUILD_EXTMOD.
> > I am not sure of what most of developers want but if the patches must be relative to
> > the Linux kernel root, the following patch must be used.
> 
> If you are checking your out-of-tree module, then you're probably not
> going to send the resulting patch to lkml.
> 

Indeed. I thus acked the original patch last Monday [1].

Thanks.

[1] http://lkml.org/lkml/2010/7/5/136

> Michal
> 

-- 
Nicolas Palix
Tel: (+33) 1 44 27 87 25
Tel: (+33) 6 81 07 91 72
Web: http://www.diku.dk/~npalix/

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-07-07 13:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-03 15:20 [PATCH] coccicheck: use $KBUILD_EXTMOD when available Kulikov Vasiliy
2010-07-03 15:20 ` Kulikov Vasiliy
2010-07-03 19:49 ` Nicolas Palix
2010-07-03 19:49   ` Nicolas Palix
2010-07-04  8:41   ` Kulikov Vasiliy
2010-07-04  8:41     ` Kulikov Vasiliy
2010-07-07 11:04   ` Michal Marek
2010-07-07 11:04     ` Michal Marek
2010-07-07 12:22     ` Nicolas Palix
2010-07-07 12:22       ` Nicolas Palix
2010-07-05 12:48 ` Nicolas Palix
2010-07-05 12:48   ` Nicolas Palix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.