From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
To: linux-kernel@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>,
Julia Lawall <Julia.Lawall@lip6.fr>,
Nicolas Palix <nicolas.palix@imag.fr>,
cocci@systeme.lip6.fr
Subject: [PATCH 2 1/2] coccicheck: Allow the user to give a V= (verbose) argument
Date: Tue, 29 Jan 2013 17:03:37 +0100 [thread overview]
Message-ID: <20130129160337.28754.31558.stgit@localhost.localdomain> (raw)
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>
CC: Nicolas Palix <nicolas.palix@imag.fr>
CC: cocci@systeme.lip6.fr
CC: Michal Marek <mmarek@suse.cz>
---
Documentation/coccinelle.txt | 4 ++++
scripts/coccicheck | 11 ++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/Documentation/coccinelle.txt b/Documentation/coccinelle.txt
index cf44eb6..dffa2d6 100644
--- a/Documentation/coccinelle.txt
+++ b/Documentation/coccinelle.txt
@@ -87,6 +87,10 @@ As any static code analyzer, Coccinelle produces false
positives. Thus, reports must be carefully checked, and patches
reviewed.
+To enable verbose messages set the V= variable, for example:
+
+ make coccicheck MODE=report V=1
+
Using Coccinelle with a single semantic patch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/scripts/coccicheck b/scripts/coccicheck
index 1a49d1c..f8f15a2 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -2,6 +2,15 @@
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
ONLINE=1
@@ -55,7 +64,7 @@ coccinelle () {
#
# $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/||"`
next prev reply other threads:[~2013-01-29 16:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 16:03 [PATCH 2 2/2] coccicheck: Allow to show the executed command line Bernd Schubert
2013-01-29 16:03 ` Bernd Schubert [this message]
2013-02-01 9:05 ` [PATCH 2 1/2] coccicheck: Allow the user to give a V= (verbose) argument Nicolas Palix
2013-02-22 10:41 ` Michal Marek
2013-02-01 9:07 ` [PATCH 2 2/2] coccicheck: Allow to show the executed command line Nicolas Palix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130129160337.28754.31558.stgit@localhost.localdomain \
--to=bernd.schubert@itwm.fraunhofer.de \
--cc=Julia.Lawall@lip6.fr \
--cc=cocci@systeme.lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=nicolas.palix@imag.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox