]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Coccinelle: Update the options used to the new option scheme
authorNicolas Palix <nicolas.palix@imag.fr>
Thu, 20 Jun 2013 11:10:56 +0000 (13:10 +0200)
committerMichal Marek <mmarek@suse.cz>
Wed, 3 Jul 2013 20:58:13 +0000 (22:58 +0200)
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>
34 files changed:
scripts/coccicheck
scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci
scripts/coccinelle/api/alloc/kzalloc-simple.cocci
scripts/coccinelle/api/d_find_alias.cocci
scripts/coccinelle/api/devm_request_and_ioremap.cocci
scripts/coccinelle/api/kstrdup.cocci
scripts/coccinelle/api/memdup.cocci
scripts/coccinelle/api/memdup_user.cocci
scripts/coccinelle/api/ptr_ret.cocci
scripts/coccinelle/api/simple_open.cocci
scripts/coccinelle/free/devm_free.cocci
scripts/coccinelle/free/kfree.cocci
scripts/coccinelle/free/kfreeaddr.cocci
scripts/coccinelle/iterators/fen.cocci
scripts/coccinelle/iterators/itnull.cocci
scripts/coccinelle/iterators/list_entry_update.cocci
scripts/coccinelle/iterators/use_after_iter.cocci
scripts/coccinelle/locks/call_kern.cocci
scripts/coccinelle/locks/double_lock.cocci
scripts/coccinelle/locks/flags.cocci
scripts/coccinelle/locks/mini_lock.cocci
scripts/coccinelle/misc/boolinit.cocci
scripts/coccinelle/misc/cstptr.cocci
scripts/coccinelle/misc/doubleinit.cocci
scripts/coccinelle/misc/ifaddr.cocci
scripts/coccinelle/misc/ifcol.cocci
scripts/coccinelle/misc/noderef.cocci
scripts/coccinelle/misc/orplus.cocci
scripts/coccinelle/misc/warn.cocci
scripts/coccinelle/null/eno.cocci
scripts/coccinelle/null/kmerr.cocci
scripts/coccinelle/tests/doublebitand.cocci
scripts/coccinelle/tests/doubletest.cocci
scripts/coccinelle/tests/odd_ptr_err.cocci

index ad8e8ffd3c7ec7c6d32008196f2323836b3877dd..d3757adb126004fa5d817460d8db5244220c95be 100755 (executable)
@@ -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
 
 }
index 7d4771d449c3491e24ed9ff701a56e6991c108ac..bd5d08b882ee9ccda1d79da6f596e34f0ec12ef1 100644 (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
index 046b9b16f8f9447e7c095f279cae99337ffaa3d8..52c55e4fa67dd64499e7318ccee7371ee023bfd6 100644 (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
index a9694a8d3e5aba722e03cd130a8d6d032e27a8da..9594c9f7eb8d9c5552ea7141138969230f00d691 100644 (file)
@@ -4,7 +4,7 @@
 //
 // Confidence: Moderate
 // URL: http://coccinelle.lip6.fr/
-// Options: -include_headers
+// Options: --include-headers
 
 virtual context
 virtual org
index 46beb81406ab34661aea4d049e007ae12b124de0..562ec88b6352d4c449361abc484ca9e8601cd406 100644 (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
index 07a74b2c6196c0dc649aaadeee908272ed665d15..09cba54ed0cfdb3f788e6ea1eadcf1e7cd158012 100644 (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
index 4dceab6d54de5deabae0ac3eea2aa6d00da275d8..3d1aa71b757913c31a9375be94a9d13516c658c3 100644 (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
index 2b131a8a13069478ada25059346480e5489c4717..c606231b0e4695683327bdd92132879dd1113bbe 100644 (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
index 15f076fdecbe073474e3eeeaf9e813a3fa77667e..2274638d005b3f5e9dfb4e5636b9c7f0bdf7c4dc 100644 (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
index 05962f7be155b3424cc44437a21e4dc4901b0023..b67e174f3d95effd048f0bf15a412aa536e2820e 100644 (file)
@@ -4,7 +4,7 @@
 ///
 // Confidence: High
 // Comments:
-// Options: -no_includes -include_headers
+// Options: --no-includes --include-headers
 
 virtual patch
 virtual report
index 0a1e36146d76dcdfa20eb948d0ef4c4f4f941e70..3d9349012bb3b3bafec7f21b62464e818d6ef4f4 100644 (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
index d9ae6d89c2f57e9db00a856f461b1f968cf07018..577b78056990bb01e56420b044932a1e187adc40 100644 (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
index 662e997da83442bebb9e233383600d1f97656b0d..ce8aacc314cb19df1a2d6a40d1cd1a0f137dc669 100644 (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
index 0a40af828c43a4161b94d2b9c85a66830ae60f1b..48c152f224e1395cbdb9a133aa9041ef756c91db 100644 (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
index 259899f6838edaa463d16d445e7f7b8f39d132f6..f58732b56a403a1266baa96b6e7692e9c085861b 100644 (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
index b2967475679b3926179e466cf6285b5b229969e6..873f444e7137f0fbbde99b683a382fbd93c3d472 100644 (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
index 06284c57a95136b5badbda64c35737de9a2ce84d..f085f5968c5238d631d6239c9d2a92a1b85fcd91 100644 (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
index 8f10b49603c32e11b9c0aa2845da8f11d7901f5e..669b24436248d33a5fde8694375c8528de752f08 100644 (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
index 63b24e682fad112188d0bdfc5b4c80d9009f0a13..002752f97dcab4265173fb5205db3ff393e9bc1d 100644 (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
index 1c4ffe6fd846746d64a1a34168fb3864f18b9af8..debd70e46267f00a06e33a4b59dfeabb945bce4b 100644 (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
index 3267d7410bd5072aaab32efd8d5e4c4f06205618..47f649b0ea876593353ed045657b2632f17beb72 100644 (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
index 97ce41ce813596a98952757c68a2104a0dc7c6ba..b9abed49cd95c5c99841a4e5016eb3c4fda4c1fb 100644 (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
index d42564484528c10a8382a3f8498a6de012ef6c78..f0368b3d4563ce3a3411d626ec4e76b4ca2fce60 100644 (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
index cf74a00cf59740d51f828f3140460f77268c1d40..c0c3371d25e0c748533455fee1d4b4a236f50ba5 100644 (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
index 3e4089a770007d196ed872751f0f589bce34e9f0..8aebd1875e75264016ed2ff37a7a21a047b7feae 100644 (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
index b7ed91dbeb9551d1de29919c253f8b5862d2ac43..d0d00ef1f12ad0503113a1f0448ce75192f44506 100644 (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
index c1707214e6025cca3bbd82b0673d8f6ac43621f8..80a831c91161a88deb402a5d4b99beb889d60484 100644 (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
index 4a28cef1484e509d7cdd353a2da42cfdad2f6cec..81fabf37939033eae4224f9cf9a99320e6f765cc 100644 (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
index fda8c3558e4f3d2d28429b685d51569a93858784..d2e5b6cedb84da42db3f7c68bc7e68724a3603c9 100644 (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
index ed961a1f7d11b28c8e9581e4bffa43edaa495a5b..9bd29aa833995d8a74a9b5fdbcae9dadc64a2dfe 100644 (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
index 949bf656c64c69b78fbe41ac66d55b1587107a03..5354a7903ccbe5f76a4dac24b9fef455bfd1298d 100644 (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
index 9ba73d05a77eec771d706b2656cebab30530167f..72f1572aaec36f737f277eb6a22d6b231dd63f1e 100644 (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
index 13a2c0e8a4bf9cbbb146a00ec23ec44cceb85d5d..78d74c22ca12da130c77702f98741fc4c89e3724 100644 (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
index e8dd8a6b28a284894ccc4492250112025108031a..cfe0a35cf2dd219090d6186996fd3a5ca6b94fda 100644 (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