Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp530847ybg; Wed, 23 Oct 2019 01:56:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBl4jRBPsAaSNT1QSvBO6tIpHUhav32tasWw/UYslK1v//E6pc39gLpi0NUOcVn9Km35wQ X-Received: by 2002:a50:b536:: with SMTP id y51mr18189301edd.271.1571821018012; Wed, 23 Oct 2019 01:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571821018; cv=none; d=google.com; s=arc-20160816; b=lLUh+wBUM3DRN8wSg0JAbSEO0f/KUyGNODia4aQM2gI9xeiFtVez5kfgzgJ0a02bGP cx02EJDtHGT3Sd+jg8gypq+F1QT+U1xqADU9aDHQoaONRK331JRP+L6AMEnnuDE8BX96 0qCIONNS78ORx0j8Nqx41oYJ6xn8L1SPkU3I5g/BhZj+kbyFa4zsuD3StAvK6OguqKwm kd0NWBpmAP1ydPPr80pkxdXp3Ae6dB3oyP4H/5BjiE/xGKWA7tnlCS6uxXAw1mHWRTjy sXZG0cirUQxLS26r3YUi2d3bRp4ubsiGmbWmJxaOmg80idOmb0EKL++1qAPVmkMM/eBA WqoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=Pa/6BwboGFwSEpr3Jpxa4KpeBT4FzbCglvmpNoYdwGk=; b=bZfUabqpsbBYvsX49p0MOUqlYmgllVNYXL6mWusYLPhu0J4/lYYYqXsXc5C66z/xQg a6ypsR/+6xw8ShqtT/2mR3pExBgrmEUliKRd/E4qSE9+Xp+QrZwZtCG+8u13qi+CaLXb jzcRPaA+yr0L06VbWa7+VngAWx/Wf8cmdpC9rP3vTLOoxg+rekIIMQWRlcfoJP1kCACR 4Y7FH9ShK6+F41AZW0cyttLay2Adtu5OEhv6byjz4yL5ReWlqYr2DJUV0zdU38744JkL pvYL/5TmKZsWj9cjwt0DawrtqKwBiRVZP/BmMqOFN+OYbrYYht0NHYFznj0uiJJ4kZDk jcLw== ARC-Authentication-Results: i=1; mx.google.com; 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 p2si13968034edx.106.2019.10.23.01.56.33; Wed, 23 Oct 2019 01:56:58 -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; 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 S2390436AbfJWIzn (ORCPT + 99 others); Wed, 23 Oct 2019 04:55:43 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:12734 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387829AbfJWIzn (ORCPT ); Wed, 23 Oct 2019 04:55:43 -0400 X-IronPort-AV: E=Sophos;i="5.68,220,1569276000"; d="scan'208";a="323927878" Received: from unknown (HELO hadrien) ([154.43.32.124]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 10:55:40 +0200 Date: Wed, 23 Oct 2019 10:55:39 +0200 (CEST) From: Julia Lawall X-X-Sender: julia@hadrien To: zhongshiqi cc: Julia.Lawall@lip6.fr, Gilles Muller , nicolas.palix@imag.fr, michal.lkml@markovi.net, cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, wang.yi59@zte.com.cn, cheng.shengyu@zte.com.cn, yamada.masahiro@socionext.com Subject: Re: [PATCH] Configuring COCCI parameter as a directory is supportted In-Reply-To: <1571819563-18118-1-git-send-email-zhong.shiqi@zte.com.cn> Message-ID: References: <1571819563-18118-1-git-send-email-zhong.shiqi@zte.com.cn> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Oct 2019, zhongshiqi wrote: > This patch puts a modification in scripts/coccicheck which supports users > in configuring COCCI parameter as a directory to traverse files in > directory. > > Signed-off-by: zhongshiqi > --- > scripts/coccicheck | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/scripts/coccicheck b/scripts/coccicheck > index e04d328..a1c4197 100755 > --- a/scripts/coccicheck > +++ b/scripts/coccicheck > @@ -257,6 +257,10 @@ if [ "$COCCI" = "" ] ; then > for f in `find $srctree/scripts/coccinelle/ -name '*.cocci' -type f | sort`; do > coccinelle $f > done > +elif [ -d "$COCCI" ] ; then > + for f in `find $COCCI/ -name '*.cocci' -type f | sort`; do > + coccinelle $f > + done > else > coccinelle $COCCI > fi Thanks for the contribution. I'm not that knowledgeable about these scripts. What is the relation between the last two if branches? If the first one fails, does that mean that $COCCI has no definition? In that case, is the final else useful? thanks, julia