Skip to content

Commit bad6a40

Browse files
npalixmichal42
authored andcommitted
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>
1 parent ed621cc commit bad6a40

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎scripts/coccicheck‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ else
2929
if [ "$KBUILD_EXTMOD" = "" ] ; then
3030
OPTIONS="-dir $srctree $COCCIINCLUDE"
3131
else
32-
OPTIONS="-dir $KBUILD_EXTMOD -patch $srctree $COCCIINCLUDE"
32+
OPTIONS="-dir $KBUILD_EXTMOD $COCCIINCLUDE"
3333
fi
3434
fi
3535

36+
if [ "$KBUILD_EXTMOD" != "" ] ; then
37+
OPTIONS="-patch $srctree $OPTIONS"
38+
fi
39+
3640
if [ ! -x "$SPATCH" ]; then
3741
echo 'spatch is part of the Coccinelle project and is available at http://coccinelle.lip6.fr/'
3842
exit 1

0 commit comments

Comments
 (0)