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
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
}
......
......@@ -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
......
......@@ -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
......
......@@ -4,7 +4,7 @@
//
// Confidence: Moderate
// URL: http://coccinelle.lip6.fr/
// Options: -include_headers
// Options: --include-headers
virtual context
virtual org
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -4,7 +4,7 @@
///
// Confidence: High
// Comments:
// Options: -no_includes -include_headers
// Options: --no-includes --include-headers
virtual patch
virtual report
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
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