diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-10-26 00:55:51 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-14 09:19:04 -0500 |
commit | cd1af7cfbbdc7719b74ad9f3c88e50bb77713664 (patch) | |
tree | 7da052ab458d6885b499848295dc903a123eb794 /scripts/coccicheck | |
parent | e0be348e4d6ebd660c9558bcee50f648491cfef6 (diff) |
coccinelle: fix verbose message about .cocci file being run
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>
Acked-by: Nicolas Palix <nicolas.palix@imag.fr>
Diffstat (limited to 'scripts/coccicheck')
-rwxr-xr-x | scripts/coccicheck | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/coccicheck b/scripts/coccicheck index 97f28f0f9498..41a85b1ed35e 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck | |||
@@ -186,7 +186,7 @@ coccinelle () { | |||
186 | 186 | ||
187 | if [ $VERBOSE -ne 0 -a $ONLINE -eq 0 ] ; then | 187 | if [ $VERBOSE -ne 0 -a $ONLINE -eq 0 ] ; then |
188 | 188 | ||
189 | FILE=`echo $COCCI | sed "s|$srctree/||"` | 189 | FILE=${COCCI#$srctree/} |
190 | 190 | ||
191 | echo "Processing `basename $COCCI`" | 191 | echo "Processing `basename $COCCI`" |
192 | echo "with option(s) \"$OPT\"" | 192 | echo "with option(s) \"$OPT\"" |