From: Nicolas Palix Date: Sat, 2 Mar 2013 21:36:28 +0000 (+0100) Subject: Coccinelle: Fix patch output when coccicheck is used with M= and C= X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bad6a4092e7f87c5310ff342bc0d766a44bcf8fa;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Michal Marek --- 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