diff options
author | Bernd Schubert <bernd.schubert@itwm.fraunhofer.de> | 2013-01-29 11:03:37 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2013-02-22 05:39:13 -0500 |
commit | 26e56720916a2a84704d46268375f204f58bebc8 (patch) | |
tree | 75f7696f870de3b4d1ccf666c54b86f1ca3c4355 | |
parent | ff3771cb717fd532d97f354cd169fd10da0d0339 (diff) |
coccicheck: Allow the user to give a V= (verbose) argument
Do not run with verbosity on/off depending on the ONLINE variable,
which gets set with C=1 or C=2, but allow the user to set the
verbosity using kernel default make V= paramemter.
Verbosity is off by default now.
Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Nicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r-- | Documentation/coccinelle.txt | 4 | ||||
-rwxr-xr-x | scripts/coccicheck | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt index cf44eb6499b4..dffa2d620d6d 100644 --- a/Documentation/coccinelle.txt +++ b/Documentation/coccinelle.txt | |||
@@ -87,6 +87,10 @@ As any static code analyzer, Coccinelle produces false | |||
87 | positives. Thus, reports must be carefully checked, and patches | 87 | positives. Thus, reports must be carefully checked, and patches |
88 | reviewed. | 88 | reviewed. |
89 | 89 | ||
90 | To enable verbose messages set the V= variable, for example: | ||
91 | |||
92 | make coccicheck MODE=report V=1 | ||
93 | |||
90 | 94 | ||
91 | Using Coccinelle with a single semantic patch | 95 | Using Coccinelle with a single semantic patch |
92 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 96 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
diff --git a/scripts/coccicheck b/scripts/coccicheck index 1a49d1c7ecfe..f8f15a269e1a 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck | |||
@@ -2,6 +2,15 @@ | |||
2 | 2 | ||
3 | SPATCH="`which ${SPATCH:=spatch}`" | 3 | SPATCH="`which ${SPATCH:=spatch}`" |
4 | 4 | ||
5 | # The verbosity may be set by the environmental parameter V= | ||
6 | # as for example with 'make V=1 coccicheck' | ||
7 | |||
8 | if [ -n "$V" -a "$V" != "0" ]; then | ||
9 | VERBOSE=1 | ||
10 | else | ||
11 | VERBOSE=0 | ||
12 | fi | ||
13 | |||
5 | if [ "$C" = "1" -o "$C" = "2" ]; then | 14 | if [ "$C" = "1" -o "$C" = "2" ]; then |
6 | ONLINE=1 | 15 | ONLINE=1 |
7 | 16 | ||
@@ -55,7 +64,7 @@ coccinelle () { | |||
55 | # | 64 | # |
56 | # $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null | 65 | # $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null |
57 | 66 | ||
58 | if [ "$ONLINE" = "0" ] ; then | 67 | if [ $VERBOSE -ne 0 ] ; then |
59 | 68 | ||
60 | FILE=`echo $COCCI | sed "s|$srctree/||"` | 69 | FILE=`echo $COCCI | sed "s|$srctree/||"` |
61 | 70 | ||