Received: by 10.223.164.221 with SMTP id h29csp167481wrb; Fri, 27 Oct 2017 16:58:54 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RmabcKDAKd83fiQEztRmotY1JRaH3Uh89fV2FPHX86qL4GOMVDWT+vUvl0lud0mY4iIf07 X-Received: by 10.98.16.66 with SMTP id y63mr1855707pfi.192.1509148734310; Fri, 27 Oct 2017 16:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509148734; cv=none; d=google.com; s=arc-20160816; b=iwtQmtyFtlHF1wORdOXSV4ShDFwU2ysfdzEQ7NUFnVm933CPDod63FKsptLdhHCl4E ZHpQ6KUHS5FwHYpfxSujpHRevFQrckrycA2e5u2GKyTHnDMIW5vwTEdpb4doxUQ11Lsh Bnoh12hq30cj5k3HvjMW6P8PI5wKeAghwbCelM+QsBSozz660yIbOfqxsqjsVaaian6U 9d5O1pR+mgHT05I/JzcS2xr6Eedh4aZUg56ilsShtiJGzCJNoI8QOXv58NWuCFKOFQZj jiNPuWUMaEV2VvS2qj3m3maNZmRyc4dzVsJSSaCDPORX36+htWcKLc7ndPQvvvmiZnB8 dJWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Oztp/4sI595+f/OftDwqum/ZCxZkaB/CHsnqlXQuWYw=; b=xcYP0MvM4AkBRKkOeqJA/VLolb1RDkdjbKt2kor0BUzRLY8IWvXMRsmraqAZq6WKda FHckNOKyYFj3gmlSr3sw5B+IF5nWfBnNCv25ouMrNgPVZhr4UwLmtzBNxL5J6dzZEroE OvCcBxErsuV6Bc/H3DQ7Goq4pczhWfNTx0EXd1x9ppb/ccRb4IdNluGPnx3y0/NrWZKu ujFNwgWSusNaCD37Yzc6Zn5AXxfr2NKcLD4csaUsk+RaxwfI1hKMzNqcMJWFNSiY6F/k E7bLmoVgc6m2VBVOBCqIn0fZpICJU/5xhCFGxnBDWsC3WSXy8QoIQInesjpQYNFOHyyF 5O7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QVuI1Hsg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k19si5578311pgf.206.2017.10.27.16.58.41; Fri, 27 Oct 2017 16:58:54 -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=@gmail.com header.s=20161025 header.b=QVuI1Hsg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932697AbdJ0X4p (ORCPT + 99 others); Fri, 27 Oct 2017 19:56:45 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:54788 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932327AbdJ0X4m (ORCPT ); Fri, 27 Oct 2017 19:56:42 -0400 Received: by mail-io0-f193.google.com with SMTP id e89so15997745ioi.11; Fri, 27 Oct 2017 16:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Oztp/4sI595+f/OftDwqum/ZCxZkaB/CHsnqlXQuWYw=; b=QVuI1Hsgaci4tCs4B9dTGC9vUsVT6oT7O4cqfvMRFh0Ayi2qUvTBHwXkjRfyIuNnv/ aHXNYyonHsjD97+V1Lxxz2hQ7FXnREeC7jOLseZYfIG/KtwdUAvVoPKTNXGUCi3n677I gL5zwd9yujnSsdOxVUVGFdnbMW1jdZGOomthwFZW/BjITCWzKTuCuy0iatuhsepyvKbS NmtfFcT6CtsE85lPmHDCV8dWQDT8wctpHWPqBPHsiOc+NCOL/VefV6kFbYcO7ZBhHRSA 7di4K6TlZdiJq/mEslf3jdrj1o7ISjixnBz72MelCiE0qToB8cHHmtDKvKIZBXZPKAUf Tpxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Oztp/4sI595+f/OftDwqum/ZCxZkaB/CHsnqlXQuWYw=; b=G0MkSTHotIvR849RkQplF5/3sY3ePmHCYzn5Ep7xh2DmlbrdCIYgb8OPs6omJH8pli ewOmhQnBHoSqfca6G88sce4sr+GeYff4CvDgRWKvXFppVgK0P6nzELk8fBtXE2zohe4Z x7f68DLQ/fk6ju46+rSXNZW1J3ZdKXBJ53yMM9SViYmK4fQL63Z4/Szmo9Aka4+2ubXJ NIgBsgHwwMwrTjCiXatPz3WCyateRuEmOBmshV0+2uzEVsQsUWHnBf0h/+U+ZAnZCRPv kkJ1M53KHqHVGwvwGDIRoJupThIG2uOHLhWo/dj/p/qNuB0LImqLSh+oFTWmPzSfP1e4 CsEw== X-Gm-Message-State: AMCzsaWrHd9+cv8hxY3l2uF9RRbXElh+sNhn8FyDGEIiFKmq2IHcMMDK RGKXjauX7d373ijk5Am3OormFyZmhq+LsdqkZ+g= X-Received: by 10.36.249.73 with SMTP id l70mr2764289ith.70.1509148601375; Fri, 27 Oct 2017 16:56:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.36.134 with HTTP; Fri, 27 Oct 2017 16:56:40 -0700 (PDT) In-Reply-To: <1508993751-17218-1-git-send-email-yamada.masahiro@socionext.com> References: <1508993751-17218-1-git-send-email-yamada.masahiro@socionext.com> From: Jim Davis Date: Fri, 27 Oct 2017 16:56:40 -0700 Message-ID: Subject: Re: [PATCH] coccinelle: fix verbose message about .cocci file being run To: Masahiro Yamada Cc: cocci@systeme.lip6.fr, linux-kbuild , Julia Lawall , Nicolas Palix , linux-kernel , Gilles Muller , Michal Marek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 25, 2017 at 9:55 PM, Masahiro Yamada wrote: > 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(-) > > 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/} [jim@krebstar linux-rc]$ make CONFIG_SHELL=dash V=1 COCCI=scripts/coccinelle/free/kfree.cocci coccicheck dash ./scripts/coccicheck ./scripts/coccicheck: 63: ./scripts/coccicheck: Bad substitution make: *** [Makefile:1585: coccicheck] Error 2 -- Jim From 1582303932091870408@xxx Thu Oct 26 07:23:40 +0000 2017 X-GM-THRID: 1582294822592397636 X-Gmail-Labels: Inbox,Category Forums