Skip to content
Snippets Groups Projects
Commit 26e56720 authored by Bernd Schubert's avatar Bernd Schubert Committed by Michal Marek
Browse files

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: default avatarBernd Schubert <bernd.schubert@itwm.fraunhofer.de>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: default avatarNicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent ff3771cb
No related branches found
No related tags found
No related merge requests found
...@@ -87,6 +87,10 @@ As any static code analyzer, Coccinelle produces false ...@@ -87,6 +87,10 @@ As any static code analyzer, Coccinelle produces false
positives. Thus, reports must be carefully checked, and patches positives. Thus, reports must be carefully checked, and patches
reviewed. reviewed.
To enable verbose messages set the V= variable, for example:
make coccicheck MODE=report V=1
Using Coccinelle with a single semantic patch Using Coccinelle with a single semantic patch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
...@@ -2,6 +2,15 @@ ...@@ -2,6 +2,15 @@
SPATCH="`which ${SPATCH:=spatch}`" SPATCH="`which ${SPATCH:=spatch}`"
# The verbosity may be set by the environmental parameter V=
# as for example with 'make V=1 coccicheck'
if [ -n "$V" -a "$V" != "0" ]; then
VERBOSE=1
else
VERBOSE=0
fi
if [ "$C" = "1" -o "$C" = "2" ]; then if [ "$C" = "1" -o "$C" = "2" ]; then
ONLINE=1 ONLINE=1
...@@ -55,7 +64,7 @@ coccinelle () { ...@@ -55,7 +64,7 @@ coccinelle () {
# #
# $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null # $SPATCH -D $MODE $FLAGS -parse_cocci $COCCI $OPT > /dev/null
if [ "$ONLINE" = "0" ] ; then if [ $VERBOSE -ne 0 ] ; then
FILE=`echo $COCCI | sed "s|$srctree/||"` FILE=`echo $COCCI | sed "s|$srctree/||"`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment