]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Coccinelle: Fix patch output when coccicheck is used with M= and C=
authorNicolas Palix <nicolas.palix@imag.fr>
Sat, 2 Mar 2013 21:36:28 +0000 (22:36 +0100)
committerMichal Marek <mmarek@suse.cz>
Mon, 8 Apr 2013 13:42:03 +0000 (15:42 +0200)
When the M variable is used, the -patch option should be given
to spatch. This patch fixes the case where C is used.

Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/coccicheck

index 6d492c096ade835303dc08bbebe07e815a711fcd..06fcb3333247358c29b15f4b222b2f654d0e1465 100755 (executable)
@@ -29,10 +29,14 @@ else
     if [ "$KBUILD_EXTMOD" = "" ] ; then
         OPTIONS="-dir $srctree $COCCIINCLUDE"
     else
-        OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree $COCCIINCLUDE"
+        OPTIONS="-dir $KBUILD_EXTMOD $COCCIINCLUDE"
     fi
 fi
 
+if [ "$KBUILD_EXTMOD" != "" ] ; then
+    OPTIONS="-patch $srctree $OPTIONS"
+fi
+
 if [ ! -x "$SPATCH" ]; then
     echo 'spatch is part of the Coccinelle project and is available at http://coccinelle.lip6.fr/'
     exit 1