From patchwork Thu Oct 26 04:55:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 117168 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp341021qgn; Wed, 25 Oct 2017 21:57:08 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RTREV0wFH1+vyYIaegjE/Th3CjS+otW6BNEXutZas2F2NfvW9CcyDVu9jmXqVFbH0P8Wha X-Received: by 10.99.111.5 with SMTP id k5mr3937394pgc.364.1508993828104; Wed, 25 Oct 2017 21:57:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508993828; cv=none; d=google.com; s=arc-20160816; b=CXjlX/GOy9//k3oSdE7MkuWF7LOFVDL3R+Ue4JqYN9LYSnxWchd/EEK/D57Rw45lZm 08zO4Ka246MUTzVLIrz6a6y2M/ih0+A9+vtYAhAB65D6GNuxd+PnTx+DhSi2+WjzGukX t74Yau/Ce9Q9/i+PrYKnxGlmzJ0Kt40hRmpcp/qHmUxehPhKv6PwEeWKPXx3ISFMeqP3 KM51fZrg7c3LSAtfYAzsusWWV7+8wFJTOQzBfojMfWQuy9nUUkCer2nLwKNJW93MRHuE di3XUO1L5I90szl1fryIdz+OjbSsxWPaHcqdySTgK7H1Tt+uLhZlH1bW/XzucCs/RGus z5WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=s4DS0ERv4STt/Sc6Tkq8VFQLHD5gCvbU8Dd0U1m8DX8=; b=moWeSOBWu/ZU97GpsQ6SO3t3oqagE/01zjzzVFM/T1yE51tDadUSt1xeDsYjqO5vrQ enlnpDA8YGv2AtsDqHZhIVMFmkxjZYlMIGKiLXydgMnRIbr5+rC+DrjKsgt6DJVMIZGc ndpU2Ig8zBX5bafrXArzydWugNU8AIe7Zl7tSSjpAjmBoXQNeBbooQRvezD/BOUer9fY PRpwS7PPIsGocTQV3grIy5ovorCqMFhRH/H8eQH63JoDEg6JOKo3X/RNbjDLuxGRlzlb QkqlJJ3dFYtJbEQTAYhqkvuUNoYwQQHqseQW5FNawg/tjuJzkdrx+m49d5wtyYnUlisH g5ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jAVp2tcC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si2501144pla.52.2017.10.25.21.57.07; Wed, 25 Oct 2017 21:57:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=jAVp2tcC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751547AbdJZE5G (ORCPT + 27 others); Thu, 26 Oct 2017 00:57:06 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:62937 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750859AbdJZE5C (ORCPT ); Thu, 26 Oct 2017 00:57:02 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id v9Q4tsd1019427; Thu, 26 Oct 2017 13:55:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com v9Q4tsd1019427 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1508993755; bh=s4DS0ERv4STt/Sc6Tkq8VFQLHD5gCvbU8Dd0U1m8DX8=; h=From:To:Cc:Subject:Date:From; b=jAVp2tcCrJjA31CGPw7bGXjS1uIe7il+mcFMnKduVhVE3Lw8A9cJ5NDeJ7NkklAUl /GUdsYQrydOs1kdioyU8FvEyIk+/LI4V4XDx5hoNL1MvACqDFpka1aBynBy6ozcNiD mZfegVZZh/ybxulkNi6ASourajlbwCgKTYe0t78JKrEL8p0ow6y10bLGJH1+Zb7l/N 3jlSKOZjl31ANu9nL32w7gI7dVhSWt28pH2Y7PW0AaVftMRYEgJjUoTytRJmrUSzv+ gDhbuKRdOkCFpOmrV3vFr2iuZ9nccV8G7x5TMrlWs8uMoRDPT8dvXgPT1mx9uQXjO2 10gMfrFngwbXw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: cocci@systeme.lip6.fr, linux-kbuild@vger.kernel.org, Julia Lawall Cc: Masahiro Yamada , Nicolas Palix , linux-kernel@vger.kernel.org, Gilles Muller , Michal Marek Subject: [PATCH] coccinelle: fix verbose message about .cocci file being run Date: Thu, 26 Oct 2017 13:55:51 +0900 Message-Id: <1508993751-17218-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 Acked-by: Nicolas Palix 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\""