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: Nicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Nicolas Palix 2013-06-20 13:10:56 +02:00 committed by Michal Marek
parent f7b1671137
commit 93f1446849
34 changed files with 47 additions and 47 deletions

View File

@ -20,7 +20,7 @@ else
NPROC="$J"
fi
FLAGS="$SPFLAGS -very_quiet"
FLAGS="$SPFLAGS --very-quiet"
# spatch only allows include directories with the syntax "-I include"
# while gcc also allows "-Iinclude" and "-include include"
@ -36,14 +36,14 @@ if [ "$C" = "1" -o "$C" = "2" ]; then
else
ONLINE=0
if [ "$KBUILD_EXTMOD" = "" ] ; then
OPTIONS="-dir $srctree $COCCIINCLUDE"
OPTIONS="--dir $srctree $COCCIINCLUDE"
else
OPTIONS="-dir $KBUILD_EXTMOD $COCCIINCLUDE"
OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE"
fi
fi
if [ "$KBUILD_EXTMOD" != "" ] ; then
OPTIONS="-patch $srctree $OPTIONS"
OPTIONS="--patch $srctree $OPTIONS"
fi
if [ ! -x "$SPATCH" ]; then
@ -67,7 +67,7 @@ if [ "$MODE" = "chain" ] ; then
echo 'All available modes will be tried (in that order): patch, report, context, org'
fi
elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then
FLAGS="$FLAGS -no_show_diff"
FLAGS="$FLAGS --no-show-diff"
fi
if [ "$ONLINE" = "0" ] ; then
@ -83,7 +83,7 @@ run_cmd() {
echo "Running ($NPROC in parallel): $@"
fi
for i in $(seq 0 $(( NPROC - 1)) ); do
eval "$@ -max $NPROC -index $i &"
eval "$@ --max $NPROC --index $i &"
SPATCH_PID[$i]=$!
if [ $VERBOSE -eq 2 ] ; then
echo "${SPATCH_PID[$i]} running"
@ -106,7 +106,7 @@ coccinelle () {
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
@ -147,20 +147,20 @@ coccinelle () {
if [ "$MODE" = "chain" ] ; then
run_cmd $SPATCH -D patch \
$FLAGS -sp_file $COCCI $OPT $OPTIONS || \
$FLAGS --cocci-file $COCCI $OPT $OPTIONS || \
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 \
$FLAGS -sp_file $COCCI $OPT $OPTIONS || \
$FLAGS --cocci-file $COCCI $OPT $OPTIONS || \
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
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 \
$FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
$FLAGS --cocci-file $COCCI $OPT $OPTIONS || exit 1
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
}

View File

@ -5,7 +5,7 @@
// Confidence: High
// Copyright: 2009,2010 Nicolas Palix, DIKU. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
//
// Keywords: kmalloc, kzalloc, kcalloc
// Version min: < 2.6.12 kmalloc

View File

@ -9,7 +9,7 @@
// Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU. GPLv2.
// Copyright: (C) 2009-2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/rules/kzalloc.html
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
//
// Keywords: kmalloc, kzalloc
// Version min: < 2.6.12 kmalloc

View File

@ -4,7 +4,7 @@
//
// Confidence: Moderate
// URL: http://coccinelle.lip6.fr/
// Options: -include_headers
// Options: --include-headers
virtual context
virtual org

View File

@ -10,7 +10,7 @@
// Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual org

View File

@ -6,7 +6,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual context

View File

@ -6,7 +6,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual context

View File

@ -7,7 +7,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual context

View File

@ -5,7 +5,7 @@
// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2.
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
//
// Keywords: ERR_PTR, PTR_ERR, PTR_RET
// Version min: 2.6.39

View File

@ -4,7 +4,7 @@
///
// Confidence: High
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual report

View File

@ -18,7 +18,7 @@
// Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual org
virtual report

View File

@ -10,7 +10,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual org
virtual report

View File

@ -4,7 +4,7 @@
// Copyright: (C) 2013 Julia Lawall, INRIA/LIP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual org
virtual report

View File

@ -7,7 +7,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual context

View File

@ -11,7 +11,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual context

View File

@ -9,7 +9,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual context
virtual org

View File

@ -11,7 +11,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LIP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual context
virtual org

View File

@ -9,7 +9,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual context

View File

@ -8,7 +8,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual org
virtual report

View File

@ -6,7 +6,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual context
virtual org

View File

@ -11,7 +11,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual context
virtual org

View File

@ -6,7 +6,7 @@
// Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2.
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Options: -include_headers
// Options: --include-headers
virtual patch
virtual context

View File

@ -6,7 +6,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual org
virtual report

View File

@ -8,7 +8,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// 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 report

View File

@ -6,7 +6,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual org
virtual report

View File

@ -13,7 +13,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual org
virtual report

View File

@ -6,7 +6,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual org
virtual report

View File

@ -7,7 +7,7 @@
// Copyright: (C) 2013 Gilles Muller, INRIA/LIP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual org
virtual report

View File

@ -5,7 +5,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual context

View File

@ -6,7 +6,7 @@
// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual context

View File

@ -10,7 +10,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual context
virtual org

View File

@ -10,7 +10,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual context
virtual org

View File

@ -8,7 +8,7 @@
// Copyright: (C) 2010 Gilles Muller, INRIA/LiP6. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual context
virtual org

View File

@ -7,7 +7,7 @@
// Copyright: (C) 2012 Gilles Muller, INRIA. GPLv2.
// URL: http://coccinelle.lip6.fr/
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual context