summaryrefslogtreecommitdiffstats
path: root/scripts/coccicheck
diff options
context:
space:
mode:
authorNicolas Palix <nicolas.palix@imag.fr>2013-03-02 22:36:28 +0100
committerMichal Marek <mmarek@suse.cz>2013-04-08 15:42:03 +0200
commitbad6a4092e7f87c5310ff342bc0d766a44bcf8fa (patch)
tree63f0721f18eb9adb136da38a4afdf88cc572ba8e /scripts/coccicheck
parented621cc4a5f6fd41cf02b2408273474d46ac4cac (diff)
downloadlinux-bad6a4092e7f87c5310ff342bc0d766a44bcf8fa.tar.gz
linux-bad6a4092e7f87c5310ff342bc0d766a44bcf8fa.tar.bz2
linux-bad6a4092e7f87c5310ff342bc0d766a44bcf8fa.zip
Coccinelle: Fix patch output when coccicheck is used with M= and C=
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>
Diffstat (limited to 'scripts/coccicheck')
-rwxr-xr-xscripts/coccicheck6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck
index 6d492c096ade..06fcb3333247 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -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