Skip to content

Commit

Permalink
Coccinelle: Fix patch output when coccicheck is used with M= and C=
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Palix authored and Michal Marek committed Apr 8, 2013
1 parent ed621cc commit bad6a40
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/coccicheck
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bad6a40

Please sign in to comment.