Skip to contentSkip to conversation

coccicheck in 3.3rc1

PATCH In review Greg Dietsche 4 participants 6 messages Jan 20, 2012 – Feb 24, 2012 1 message not in the archive Coccinelle/Semantic Patches (SmPL)

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 4 lines · Brice Goglin

I see that reverting d0bc1fb4 makes "make coccicheck M=..." ignore "M=..." so now I understand the aim of this commit now. I can certainly switch away from "make C=2 CHECK=scripts/coccicheck M=..." to "make coccicheck M=...". But I'd like away to get the very basic output back:

Hi Brice,
Sorry for the trouble. Can you try the patch I've created and see if it works properly when you use "make C=2 CHECK=scripts/coccicheck M=..." ? The patch puts the handling back the way it was for the C=1 and C=2 use case.

Also, I've added the LKML Mailing List to the cc so that this patch is posted publicly.

Greg Dietsche (1):
coccicheck: change handling of C={1,2} when M= is set

 scripts/coccicheck |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
Signature · 1 line
1.7.6.4
#2 lore raw

PATCH 1/1 coccicheck: change handling of C={1,2} when M= is set

This patch reverts a portion of d0bc1fb4 so that coccicheck will work properly when C=1 or C=2.

---
 scripts/coccicheck |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
scripts/coccicheck +4 -9
index 3c27764..823e972 100755
@@ -9,15 +9,10 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
 #    FLAGS="-ignore_unknown_options -very_quiet"
 #    OPTIONS=$*
 
-    if [ "$KBUILD_EXTMOD" = "" ] ; then
-        # Workaround for Coccinelle < 0.2.3
-        FLAGS="-I $srctree/include -very_quiet"
-        shift $(( $# - 1 ))
-        OPTIONS=$1
-    else
-	echo M= is not currently supported when C=1 or C=2
-	exit 1
-    fi
+# Workaround for Coccinelle < 0.2.3
+	FLAGS="-I $srctree/include -very_quiet"
+	shift $(( $# - 1 ))
+	OPTIONS=$1
 else
     ONLINE=0
     FLAGS="-very_quiet"
Signature · 1 line
1.7.6.4
Tested-by on v1 1/1
#3 lore raw

Re: [PATCH] coccicheck: change handling of C={1,2} when M= is set

Thanks a lot Greg, make C=2 CHECK=script/coccicheck M=... is back.

Quoted 33 lines · Greg Dietsche

This patch reverts a portion of d0bc1fb4 so that coccicheck will work properly when C=1 or C=2.

---
 scripts/coccicheck |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
scripts/coccicheck +4 -9
index 3c27764..823e972 100755
@@ -9,15 +9,10 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
 #    FLAGS="-ignore_unknown_options -very_quiet"
 #    OPTIONS=$*
 
-    if [ "$KBUILD_EXTMOD" = "" ] ; then
-        # Workaround for Coccinelle < 0.2.3
-        FLAGS="-I $srctree/include -very_quiet"
-        shift $(( $# - 1 ))
-        OPTIONS=$1
-    else
-	echo M= is not currently supported when C=1 or C=2
-	exit 1
-    fi
+# Workaround for Coccinelle < 0.2.3
+	FLAGS="-I $srctree/include -very_quiet"
+	shift $(( $# - 1 ))
+	OPTIONS=$1
 else
     ONLINE=0
     FLAGS="-very_quiet"
#4 lore raw

Re: [PATCH] coccicheck: change handling of C={1,2} when M= is set

Quoted 12 lines · Brice Goglin

Thanks a lot Greg, make C=2 CHECK=script/coccicheck M=... is back.

Quoted 5 lines · Greg Dietsche

This patch reverts a portion of d0bc1fb4 so that coccicheck will work properly when C=1 or C=2.

Quoted 30 lines
Quoted 28 lines
---
 scripts/coccicheck |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
scripts/coccicheck +4 -9
index 3c27764..823e972 100755
@@ -9,15 +9,10 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
 #    FLAGS="-ignore_unknown_options -very_quiet"
 #    OPTIONS=$*
 
-    if [ "$KBUILD_EXTMOD" = "" ] ; then
-        # Workaround for Coccinelle < 0.2.3
-        FLAGS="-I $srctree/include -very_quiet"
-        shift $(( $# - 1 ))
-        OPTIONS=$1
-    else
-	echo M= is not currently supported when C=1 or C=2
-	exit 1
-    fi
+# Workaround for Coccinelle < 0.2.3
+	FLAGS="-I $srctree/include -very_quiet"
+	shift $(( $# - 1 ))
+	OPTIONS=$1
 else
     ONLINE=0
     FLAGS="-very_quiet"
#5 lore raw

Re: [PATCH] coccicheck: change handling of C={1,2} when M= is set

In reply to Brice Goglin

Unless I missed something, this fix still has not been applied in 3.3-rc. Brice

Quoted 40 lines · Brice Goglin

Thanks a lot Greg, make C=2 CHECK=script/coccicheck M=... is back.

Quoted 33 lines · Greg Dietsche

This patch reverts a portion of d0bc1fb4 so that coccicheck will work properly when C=1 or C=2.

---
 scripts/coccicheck |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
scripts/coccicheck +4 -9
index 3c27764..823e972 100755
@@ -9,15 +9,10 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
 #    FLAGS="-ignore_unknown_options -very_quiet"
 #    OPTIONS=$*
 
-    if [ "$KBUILD_EXTMOD" = "" ] ; then
-        # Workaround for Coccinelle < 0.2.3
-        FLAGS="-I $srctree/include -very_quiet"
-        shift $(( $# - 1 ))
-        OPTIONS=$1
-    else
-	echo M= is not currently supported when C=1 or C=2
-	exit 1
-    fi
+# Workaround for Coccinelle < 0.2.3
+	FLAGS="-I $srctree/include -very_quiet"
+	shift $(( $# - 1 ))
+	OPTIONS=$1
 else
     ONLINE=0
     FLAGS="-very_quiet"
#6 lore raw

Re: [PATCH] coccicheck: change handling of C={1,2} when M= is set

Quoted 9 lines · Brice Goglin

Unless I missed something, this fix still has not been applied in 3.3-rc. Brice

Quoted 3 lines · Brice Goglin

Thanks a lot Greg, make C=2 CHECK=script/coccicheck M=... is back.

I applied it to kbuild.git#rc-fixes now.

Michal