diff options
| author | Nicolas Palix <nicolas.palix@imag.fr> | 2013-06-20 07:10:56 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2013-07-03 16:58:13 -0400 |
| commit | 93f14468491747d6d3efd0b3a42785b1d51a127a (patch) | |
| tree | 13f584f24835bd56a8ff40683dcfb437bbb37852 /scripts | |
| parent | f7b167113753e95ae61383e234f8d10142782ace (diff) | |
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>
Diffstat (limited to 'scripts')
34 files changed, 47 insertions, 47 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck index ad8e8ffd3c7e..d3757adb1260 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck | |||
| @@ -20,7 +20,7 @@ else | |||
| 20 | NPROC="$J" | 20 | NPROC="$J" |
| 21 | fi | 21 | fi |
| 22 | 22 | ||
| 23 | FLAGS="$SPFLAGS -very_quiet" | 23 | FLAGS="$SPFLAGS --very-quiet" |
| 24 | 24 | ||
| 25 | # spatch only allows include directories with the syntax "-I include" | 25 | # spatch only allows include directories with the syntax "-I include" |
| 26 | # while gcc also allows "-Iinclude" and "-include include" | 26 | # while gcc also allows "-Iinclude" and "-include include" |
| @@ -36,14 +36,14 @@ if [ "$C" = "1" -o "$C" = "2" ]; then | |||
| 36 | else | 36 | else |
| 37 | ONLINE=0 | 37 | ONLINE=0 |
| 38 | if [ "$KBUILD_EXTMOD" = "" ] ; then | 38 | if [ "$KBUILD_EXTMOD" = "" ] ; then |
| 39 | OPTIONS="-dir $srctree $COCCIINCLUDE" | 39 | OPTIONS="--dir $srctree $COCCIINCLUDE" |
| 40 | else | 40 | else |
| 41 | OPTIONS="-dir $KBUILD_EXTMOD $COCCIINCLUDE" | 41 | OPTIONS="--dir $KBUILD_EXTMOD $COCCIINCLUDE" |
| 42 | fi | 42 | fi |
| 43 | fi | 43 | fi |
| 44 | 44 | ||
| 45 | if [ "$KBUILD_EXTMOD" != "" ] ; then | 45 | if [ "$KBUILD_EXTMOD" != "" ] ; then |
| 46 | OPTIONS="-patch $srctree $OPTIONS" | 46 | OPTIONS="--patch $srctree $OPTIONS" |
| 47 | fi | 47 | fi |
| 48 | 48 | ||
| 49 | if [ ! -x "$SPATCH" ]; then | 49 | if [ ! -x "$SPATCH" ]; then |
| @@ -67,7 +67,7 @@ if [ "$MODE" = "chain" ] ; then | |||
| 67 | echo 'All available modes will be tried (in that order): patch, report, context, org' | 67 | echo 'All available modes will be tried (in that order): patch, report, context, org' |
| 68 | fi | 68 | fi |
| 69 | elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then | 69 | elif [ "$MODE" = "report" -o "$MODE" = "org" ] ; then |
| 70 | FLAGS="$FLAGS -no_show_diff" | 70 | FLAGS="$FLAGS --no-show-diff" |
| 71 | fi | 71 | fi |
| 72 | 72 | ||
| 73 | if [ "$ONLINE" = "0" ] ; then | 73 | if [ "$ONLINE" = "0" ] ; then |
| @@ -83,7 +83,7 @@ run_cmd() { | |||
| 83 | echo "Running ($NPROC in parallel): $@" | 83 | echo "Running ($NPROC in parallel): $@" |
| 84 | fi | 84 | fi |
| 85 | for i in $(seq 0 $(( NPROC - 1)) ); do | 85 | for i in $(seq 0 $(( NPROC - 1)) ); do |
| 86 | eval "$@ -max $NPROC -index $i &" | 86 | eval "$@ --max $NPROC --index $i &" |
| 87 | SPATCH_PID[$i]=$! | 87 | SPATCH_PID[$i]=$! |
| 88 | if [ $VERBOSE -eq 2 ] ; then | 88 | if [ $VERBOSE -eq 2 ] ; then |
| 89 | echo "${SPATCH_PID[$i]} running" | 89 | echo "${SPATCH_PID[$i]} running" |
| @@ -106,7 +106,7 @@ coccinelle () { | |||
| 106 | 106 | ||
| 107 | OPT=`grep "Option" $COCCI | cut -d':' -f2` | 107 | OPT=`grep "Option" $COCCI | cut -d':' -f2` |
| 108 | 108 | ||
| 109 | # The option '-parse_cocci' can be used to syntactically check the SmPL files. | 109 | # The option '--parse-cocci' can be used to syntactically check the SmPL files. |
| 110 | # | 110 | # |
| 111 | # $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null | 111 | # $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null |
| 112 | 112 | ||
| @@ -147,20 +147,20 @@ coccinelle () { | |||
| 147 | 147 | ||
| 148 | if [ "$MODE" = "chain" ] ; then | 148 | if [ "$MODE" = "chain" ] ; then |
| 149 | run_cmd $SPATCH -D patch \ | 149 | run_cmd $SPATCH -D patch \ |
| 150 | $FLAGS -sp_file $COCCI $OPT $OPTIONS || \ | 150 | $FLAGS --cocci-file $COCCI $OPT $OPTIONS || \ |
| 151 | run_cmd $SPATCH -D report \ | 151 | run_cmd $SPATCH -D report \ |
| 152 | $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \ | 152 | $FLAGS --cocci-file $COCCI $OPT $OPTIONS --no-show-diff || \ |
| 153 | run_cmd $SPATCH -D context \ | 153 | run_cmd $SPATCH -D context \ |
| 154 | $FLAGS -sp_file $COCCI $OPT $OPTIONS || \ | 154 | $FLAGS --cocci-file $COCCI $OPT $OPTIONS || \ |
| 155 | run_cmd $SPATCH -D org \ | 155 | run_cmd $SPATCH -D org \ |
| 156 | $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1 | 156 | $FLAGS --cocci-file $COCCI $OPT $OPTIONS --no-show-diff || exit 1 |
| 157 | elif [ "$MODE" = "rep+ctxt" ] ; then | 157 | elif [ "$MODE" = "rep+ctxt" ] ; then |
| 158 | run_cmd $SPATCH -D report \ | 158 | run_cmd $SPATCH -D report \ |
| 159 | $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff && \ | 159 | $FLAGS --cocci-file $COCCI $OPT $OPTIONS --no-show-diff && \ |
| 160 | run_cmd $SPATCH -D context \ | 160 | run_cmd $SPATCH -D context \ |
| 161 | $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 | 161 | $FLAGS --cocci-file $COCCI $OPT $OPTIONS || exit 1 |
| 162 | else | 162 | else |
| 163 | run_cmd $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 | 163 | run_cmd $SPATCH -D $MODE $FLAGS --cocci-file $COCCI $OPT $OPTIONS || exit 1 |
| 164 | fi | 164 | fi |
| 165 | 165 | ||
| 166 | } | 166 | } |
diff --git a/scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci b/scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci index 7d4771d449c3..bd5d08b882ee 100644 --- a/scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci +++ b/scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | // Confidence: High | 5 | // Confidence: High |
| 6 | // Copyright: 2009,2010 Nicolas Palix, DIKU. GPLv2. | 6 | // Copyright: 2009,2010 Nicolas Palix, DIKU. GPLv2. |
| 7 | // URL: http://coccinelle.lip6.fr/ | 7 | // URL: http://coccinelle.lip6.fr/ |
| 8 | // Options: -no_includes -include_headers | 8 | // Options: --no-includes --include-headers |
| 9 | // | 9 | // |
| 10 | // Keywords: kmalloc, kzalloc, kcalloc | 10 | // Keywords: kmalloc, kzalloc, kcalloc |
| 11 | // Version min: < 2.6.12 kmalloc | 11 | // Version min: < 2.6.12 kmalloc |
diff --git a/scripts/coccinelle/api/alloc/kzalloc-simple.cocci b/scripts/coccinelle/api/alloc/kzalloc-simple.cocci index 046b9b16f8f9..52c55e4fa67d 100644 --- a/scripts/coccinelle/api/alloc/kzalloc-simple.cocci +++ b/scripts/coccinelle/api/alloc/kzalloc-simple.cocci | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | // Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU. GPLv2. | 9 | // Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU. GPLv2. |
| 10 | // Copyright: (C) 2009-2010 Gilles Muller, INRIA/LiP6. GPLv2. | 10 | // Copyright: (C) 2009-2010 Gilles Muller, INRIA/LiP6. GPLv2. |
| 11 | // URL: http://coccinelle.lip6.fr/rules/kzalloc.html | 11 | // URL: http://coccinelle.lip6.fr/rules/kzalloc.html |
| 12 | // Options: -no_includes -include_headers | 12 | // Options: --no-includes --include-headers |
| 13 | // | 13 | // |
| 14 | // Keywords: kmalloc, kzalloc | 14 | // Keywords: kmalloc, kzalloc |
| 15 | // Version min: < 2.6.12 kmalloc | 15 | // Version min: < 2.6.12 kmalloc |
diff --git a/scripts/coccinelle/api/d_find_alias.cocci b/scripts/coccinelle/api/d_find_alias.cocci index a9694a8d3e5a..9594c9f7eb8d 100644 --- a/scripts/coccinelle/api/d_find_alias.cocci +++ b/scripts/coccinelle/api/d_find_alias.cocci | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | // | 4 | // |
| 5 | // Confidence: Moderate | 5 | // Confidence: Moderate |
| 6 | // URL: http://coccinelle.lip6.fr/ | ||
