From: Masahiro Yamada <yamada.masahiro@socionext.com> To: cocci@systeme.lip6.fr, linux-kbuild@vger.kernel.org, Julia Lawall <Julia.Lawall@lip6.fr> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>, Nicolas Palix <nicolas.palix@imag.fr>, linux-kernel@vger.kernel.org, Gilles Muller <Gilles.Muller@lip6.fr>, Michal Marek <michal.lkml@markovi.net> Subject: [PATCH] coccinelle: fix verbose message about .cocci file being run Date: Thu, 26 Oct 2017 13:55:51 +0900 [thread overview] Message-ID: <1508993751-17218-1-git-send-email-yamada.masahiro@socionext.com> (raw) If you run coccicheck with V=1 and COCCI=, you will see a strange path to the semantic patch file. For example, run the following: $ make V=1 COCCI=scripts/coccinelle/free/kfree.cocci coccicheck [ snip ] The semantic patch that makes this report is available in scriptcoccinelle/free/kfree.cocci. Notice "s/" was dropped from "scripts/coccinelle/free/kfree.cocci". When running coccicheck without O=, $srctree is expanded to ".", which represents one arbitrary character in the regular expression. Using sed is not a good choice here. Strip $srctree/ simply without sed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/coccicheck b/scripts/coccicheck index 1bfa2d2..9d18662 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -186,7 +186,7 @@ coccinelle () { if [ $VERBOSE -ne 0 -a $ONLINE -eq 0 ] ; then - FILE=`echo $COCCI | sed "s|$srctree/||"` + FILE=${COCCI#$srctree/} echo "Processing `basename $COCCI`" echo "with option(s) \"$OPT\"" -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: yamada.masahiro@socionext.com (Masahiro Yamada) To: cocci@systeme.lip6.fr Subject: [Cocci] [PATCH] coccinelle: fix verbose message about .cocci file being run Date: Thu, 26 Oct 2017 13:55:51 +0900 [thread overview] Message-ID: <1508993751-17218-1-git-send-email-yamada.masahiro@socionext.com> (raw) If you run coccicheck with V=1 and COCCI=, you will see a strange path to the semantic patch file. For example, run the following: $ make V=1 COCCI=scripts/coccinelle/free/kfree.cocci coccicheck [ snip ] The semantic patch that makes this report is available in scriptcoccinelle/free/kfree.cocci. Notice "s/" was dropped from "scripts/coccinelle/free/kfree.cocci". When running coccicheck without O=, $srctree is expanded to ".", which represents one arbitrary character in the regular expression. Using sed is not a good choice here. Strip $srctree/ simply without sed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/coccicheck b/scripts/coccicheck index 1bfa2d2..9d18662 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -186,7 +186,7 @@ coccinelle () { if [ $VERBOSE -ne 0 -a $ONLINE -eq 0 ] ; then - FILE=`echo $COCCI | sed "s|$srctree/||"` + FILE=${COCCI#$srctree/} echo "Processing `basename $COCCI`" echo "with option(s) \"$OPT\"" -- 2.7.4
next reply other threads:[~2017-10-26 4:57 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-10-26 4:55 Masahiro Yamada [this message] 2017-10-26 4:55 ` [Cocci] [PATCH] coccinelle: fix verbose message about .cocci file being run Masahiro Yamada 2017-10-26 7:22 ` Nicolas Palix (LIG) 2017-10-26 7:22 ` [Cocci] " Nicolas Palix (LIG) 2017-11-07 0:27 ` Masahiro Yamada 2017-11-07 0:27 ` [Cocci] " Masahiro Yamada 2017-11-08 13:12 ` Julia Lawall 2017-11-08 13:12 ` [Cocci] " Julia Lawall 2017-10-27 23:56 ` Jim Davis 2017-10-27 23:56 ` [Cocci] " Jim Davis 2017-10-28 11:26 ` Masahiro Yamada 2017-10-28 11:26 ` [Cocci] " Masahiro Yamada
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=1508993751-17218-1-git-send-email-yamada.masahiro@socionext.com \ --to=yamada.masahiro@socionext.com \ --cc=Gilles.Muller@lip6.fr \ --cc=Julia.Lawall@lip6.fr \ --cc=cocci@systeme.lip6.fr \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=michal.lkml@markovi.net \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.