Commit bad6a4092e7f87c5310ff342bc0d766a44bcf8fa

Authored by Nicolas Palix
Committed by Michal Marek
1 parent ed621cc4a5

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>

Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff

... ... @@ -29,8 +29,12 @@
29 29 if [ "$KBUILD_EXTMOD" = "" ] ; then
30 30 OPTIONS="-dir $srctree $COCCIINCLUDE"
31 31 else
32   - OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree $COCCIINCLUDE"
  32 + OPTIONS="-dir $KBUILD_EXTMOD $COCCIINCLUDE"
33 33 fi
  34 +fi
  35 +
  36 +if [ "$KBUILD_EXTMOD" != "" ] ; then
  37 + OPTIONS="-patch $srctree $OPTIONS"
34 38 fi
35 39  
36 40 if [ ! -x "$SPATCH" ]; then