Commit 93f14468 authored by Nicolas Palix's avatar Nicolas Palix Committed by Michal Marek

Coccinelle: Update the options used to the new option scheme

spatch has changed its option scheme.
E.g., --no_show_diff is now --no-show-diff

This patch updates:
 - scripts/coccicheck
 - Semantic patches under scripts/coccinelle/
Signed-off-by: default avatarNicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent f7b16711
...@@ -20,7 +20,7 @@ else ...@@ -20,7 +20,7 @@ else
NPROC="$J" NPROC="$J"
fi fi
FLAGS="$SPFLAGS -very_quiet" FLAGS="$SPFLAGS --very-quiet"
# spatch only allows include directories with the syntax "-I include" # spatch only allows include directories with the syntax "-I include"
# while gcc also allows "-Iinclude" and "-include include" # while gcc also allows "-Iinclude" and "-include include"
...@@ -36,14 +36,14 @@ if [ "$C" = "1" -o "$C" = "2" ]; then ...@@ -36,14 +36,14 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
else else
ONLINE=0 ONLINE=0
if [ "$KBUILD_EXTMOD" = "" ] ; then if [ "$KBUILD_EXTMOD" = "" ] ; then
OPTIONS="-dir $srctree $COCCIINCLUDE" OPTIONS="--dir $srctree $COCCIINCLUDE"
else else
OPTIONS="-dir $KBUILD_EXTMOD $COCCIINCLUDE" OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE"
fi fi
fi fi
if [ "$KBUILD_EXTMOD" != "" ] ; then if [ "$KBUILD_EXTMOD" != "" ] ; then
OPTIONS="-patch $srctree $OPTIONS" OPTIONS="--patch $srctree $OPTIONS"
fi fi
if [ ! -x "$SPATCH" ]; then if [ ! -x "$SPATCH" ]; then
...@@ -67,7 +67,7 @@ if [ "$MODE" = "chain" ] ; then ...@@ -67,7 +67,7 @@ if [ "$MODE" = "chain" ] ; then
echo 'All available modes will be tried (in that order): patch, report, context, org' echo 'All available modes will be tried (in that order): patch, report, context, org'
fi fi
elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
FLAGS="$FLAGS -no_show_diff" FLAGS="$FLAGS --no-show-diff"
fi fi
if [ "$ONLINE" = "0" ] ; then if [ "$ONLINE" = "0" ] ; then
...@@ -83,7 +83,7 @@ run_cmd() { ...@@ -83,7 +83,7 @@ run_cmd() {
echo "Running ($NPROC in parallel): $@" echo "Running ($NPROC in parallel): $@"
fi fi
for i in $(seq 0 $(( NPROC - 1)) ); do for i in $(seq 0 $(( NPROC - 1)) ); do
eval "$@ -max $NPROC -index $i &" eval "$@ --max $NPROC --index $i &"
SPATCH_PID[$i]=$! SPATCH_PID[$i]=$!
if [ $VERBOSE -eq 2 ] ; then if [ $VERBOSE -eq 2 ] ; then
echo "${SPATCH_PID[$i]} running" echo "${SPATCH_PID[$i]} running"
...@@ -106,7 +106,7 @@ coccinelle () { ...@@ -106,7 +106,7 @@ coccinelle () {
OPT=`grep "Option" $COCCI | cut -d':' -f2` OPT=`grep "Option" $COCCI | cut -d':' -f2`
# The option '-parse_cocci' can be used to syntactically check the SmPL files. # The option '--parse-cocci' can be used to syntactically check the SmPL files.
# #
# $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null # $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null
...@@ -147,20 +147,20 @@ coccinelle () { ...@@ -147,20 +147,20 @@ coccinelle () {
if [ "$MODE" = "chain" ] ; then if [ "$MODE" = "chain" ] ; then
run_cmd $SPATCH -D patch \ run_cmd $SPATCH -D patch \
$FLAGS -sp_file $COCCI $OPT $OPTIONS || \ $FLAGS --cocci-file $COCCI $OPT $OPTIONS || \
run_cmd $SPATCH -D report \ run_cmd $SPATCH -D report \
$FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \ $FLAGS --cocci-file $COCCI $OPT $OPTIONS --no-show-diff || \
run_cmd $SPATCH -D context \ run_cmd $SPATCH -D context \
$FLAGS -sp_file $COCCI $OPT $OPTIONS || \ $FLAGS --cocci-file $COCCI $OPT $OPTIONS || \
run_cmd $SPATCH -D org \ run_cmd $SPATCH -D org \
$FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1 $FLAGS --cocci-file $COCCI $OPT $OPTIONS --no-show-diff || exit 1
elif [ "$MODE" = "rep+ctxt" ] ; then elif [ "$MODE" = "rep+ctxt" ] ; then
run_cmd $SPATCH -D report \ run_cmd $SPATCH -D report \
$FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff && \ $FLAGS --cocci-file $COCCI $OPT $OPTIONS --no-show-diff && \
run_cmd $SPATCH -D context \ run_cmd $SPATCH -D context \
$FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 $FLAGS --cocci-file $COCCI $OPT $OPTIONS || exit 1
else else
run_cmd $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 run_cmd $SPATCH -D $MODE $FLAGS --cocci-file $COCCI $OPT $OPTIONS || exit 1
fi fi
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Confidence: High // Confidence: High
// Copyright: 2009,2010 Nicolas Palix, DIKU. GPLv2. // Copyright: 2009,2010 Nicolas Palix, DIKU. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
// //
// Keywords: kmalloc, kzalloc, kcalloc // Keywords: kmalloc, kzalloc, kcalloc
// Version min: < 2.6.12 kmalloc // Version min: < 2.6.12 kmalloc
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU. GPLv2. // Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU. GPLv2.
// Copyright: (C) 2009-2010 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2009-2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/rules/kzalloc.html // URL: http://coccinelle.lip6.fr/rules/kzalloc.html
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
// //
// Keywords: kmalloc, kzalloc // Keywords: kmalloc, kzalloc
// Version min: < 2.6.12 kmalloc // Version min: < 2.6.12 kmalloc
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Confidence: Moderate // Confidence: Moderate
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Options: -include_headers // Options: --include-headers
virtual context virtual context
virtual org virtual org
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual org virtual org
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual context virtual context
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual context virtual context
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual context virtual context
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2.
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
// //
// Keywords: ERR_PTR, PTR_ERR, PTR_RET // Keywords: ERR_PTR, PTR_ERR, PTR_RET
// Version min: 2.6.39 // Version min: 2.6.39
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
/// ///
// Confidence: High // Confidence: High
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual report virtual report
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
// Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. GPLv2. // Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual context virtual context
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual context virtual context
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual context virtual context
virtual org virtual org
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LIP6. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA/LIP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual context virtual context
virtual org virtual org
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual context virtual context
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual context virtual context
virtual org virtual org
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual context virtual context
virtual org virtual org
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2.
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Options: -include_headers // Options: --include-headers
virtual patch virtual patch
virtual context virtual context
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: requires at least Coccinelle 0.2.4, lex or parse error otherwise // Comments: requires at least Coccinelle 0.2.4, lex or parse error otherwise
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// Copyright: (C) 2013 Gilles Muller, INRIA/LIP6. GPLv2. // Copyright: (C) 2013 Gilles Muller, INRIA/LIP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual org virtual org
virtual report virtual report
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual context virtual context
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual context virtual context
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual context virtual context
virtual org virtual org
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual context virtual context
virtual org virtual org
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2. // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual context virtual context
virtual org virtual org
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA. GPLv2.
// URL: http://coccinelle.lip6.fr/ // URL: http://coccinelle.lip6.fr/
// Comments: // Comments:
// Options: -no_includes -include_headers // Options: --no-includes --include-headers
virtual patch virtual patch
virtual context virtual context
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment