Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2783795ybg; Thu, 24 Oct 2019 15:18:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqHqf13OtxlG3WpaVA8ZrJ9fHchTUN63DtCqe6n1WxVJLtzB4oZNb+QeMsebLenFW8WARZ X-Received: by 2002:a50:8dc9:: with SMTP id s9mr528347edh.168.1571955521542; Thu, 24 Oct 2019 15:18:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571955521; cv=none; d=google.com; s=arc-20160816; b=YGQLZ+McLK8P12EBmed8qQCLTV+QC/Zye14LUgNhjGY5c1WC9EUJwsPDg5CBbcw52/ 1tZy6KBJRGSGTqJWcHows6xhalJ8RWe8aHxioZEvNojUs30xewzCpETttBAINWBuoQvx kpJf86cDnJJXDV11AS3EOyl6JtBcill09dBFWb+kIJu7r7Wj73WGRySgf2wFOuxGHz8E v78jfxRsS7zqDgSjidhZQkLLFKzZ16rTY+mOFuhERQC8LoCJQSZ6OK004Na6mhgXE6Tv 2jcMtBOG80aCNNqI3CBbhBY/5Ux8YAP4TvasiABoxouhjCH3RnzmKZ1uLFBc+XNTe6y3 KDDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=GRQOBFsBM9wUeBiP1Lceda/lfgfIdnRfXg1LUVF5Nos=; b=O1imBFHi+WNvNmAgXMiLSmgq+GEnrSv9SDEmYQzuSOBpcA8qFAu+9wesxcCCooXV4r UHKMDE3g27ORq/RxNINBpp6gFhY5KQO/LfgPbLU1DxMHliYG7iA3S3iuAKyjXMhWWHaO udioFAfq+Ghy60tIRLLxAYLbSeVuDPmXUAG0lemJQz/w0YuAnQig/MK7qX28poP87HCF N68NuS5kaKQ5DjloKRl05EE37Gi9QXto9ZySaKLj1W+wvr7LM0syFvcDAHgyM/XlYF8s q9ijoT763hKgGzsOX7O6vMOSVGoYzwDMeR5+Bn65TwX8XhLg3CmWbpANU2YPKfrrRhwg Rnqw== 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 d24si5888116eda.162.2019.10.24.15.18.17; Thu, 24 Oct 2019 15:18:41 -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 S2437626AbfJXGCX convert rfc822-to-8bit (ORCPT + 99 others); Thu, 24 Oct 2019 02:02:23 -0400 Received: from mxhk.zte.com.cn ([63.217.80.70]:32482 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404173AbfJXGCW (ORCPT ); Thu, 24 Oct 2019 02:02:22 -0400 Received: from mse-fl2.zte.com.cn (unknown [10.30.14.239]) by Forcepoint Email with ESMTPS id 5D6A011FAB000689523C; Thu, 24 Oct 2019 14:02:20 +0800 (CST) Received: from notes_smtp.zte.com.cn (notes_smtp.zte.com.cn [10.30.1.239]) by mse-fl2.zte.com.cn with ESMTP id x9O627fR064659; Thu, 24 Oct 2019 14:02:07 +0800 (GMT-8) (envelope-from zhong.shiqi@zte.com.cn) Received: from fox-host8.localdomain ([10.74.120.8]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2019102414023406-106879 ; Thu, 24 Oct 2019 14:02:34 +0800 From: zhongshiqi To: Julia.Lawall@lip6.fr Cc: Gilles.Muller@lip6.fr, 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, zhongshiqi Subject: [PATCH v2] coccicheck:support $COCCI being defined as a directory Date: Thu, 24 Oct 2019 14:04:20 +0800 Message-Id: <1571897060-32374-1-git-send-email-zhong.shiqi@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-10-24 14:02:34, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-10-24 14:02:11 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-MAIL: mse-fl2.zte.com.cn x9O627fR064659 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Put a modification in scripts/coccicheck which supports users in configuring COCCI parameter as a directory to traverse files in directory whose next level directory contains rule files with Suffix of cocci. Signed-off-by: zhongshiqi --- Changes in v2: 1.fix patch subject according to the reply by Markus 2.change description in “imperative mood” 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 -- 2.9.5