From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F183CA9EB9 for ; Wed, 23 Oct 2019 08:31:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 653982084C for ; Wed, 23 Oct 2019 08:31:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390303AbfJWIbs (ORCPT ); Wed, 23 Oct 2019 04:31:48 -0400 Received: from out1.zte.com.cn ([202.103.147.172]:34700 "EHLO mxct.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390082AbfJWIbs (ORCPT ); Wed, 23 Oct 2019 04:31:48 -0400 Received: from mse-fl1.zte.com.cn (unknown [10.30.14.238]) by Forcepoint Email with ESMTPS id 447B0E2D470FAD69E41C; Wed, 23 Oct 2019 16:31:46 +0800 (CST) Received: from notes_smtp.zte.com.cn (notessmtp.zte.com.cn [10.30.1.239]) by mse-fl1.zte.com.cn with ESMTP id x9N8UNET081660; Wed, 23 Oct 2019 16:30:23 +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 2019102316304296-91731 ; Wed, 23 Oct 2019 16:30:42 +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] Configuring COCCI parameter as a directory is supportted Date: Wed, 23 Oct 2019 16:32:43 +0800 Message-Id: <1571819563-18118-1-git-send-email-zhong.shiqi@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-10-23 16:30:43, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-10-23 16:30:26, Serialize complete at 2019-10-23 16:30:26 X-MAIL: mse-fl1.zte.com.cn x9N8UNET081660 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.9.5 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 258F8CA9EB6 for ; Wed, 23 Oct 2019 09:57:49 +0000 (UTC) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A34292084B for ; Wed, 23 Oct 2019 09:57:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A34292084B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zte.com.cn Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=cocci-bounces@systeme.lip6.fr Received: from systeme.lip6.fr (systeme.lip6.fr [132.227.104.7]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id x9N9vUdv011546; Wed, 23 Oct 2019 11:57:30 +0200 (CEST) Received: from systeme.lip6.fr (systeme.lip6.fr [127.0.0.1]) by systeme.lip6.fr (Postfix) with ESMTP id E5F8477CE; Wed, 23 Oct 2019 11:57:29 +0200 (CEST) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by systeme.lip6.fr (Postfix) with ESMTPS id 71BAA77B4 for ; Wed, 23 Oct 2019 10:31:51 +0200 (CEST) Received: from mxct.zte.com.cn (out1.zte.com.cn [202.103.147.172]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id x9N8VlI3009615 for ; Wed, 23 Oct 2019 10:31:49 +0200 (CEST) Received: from mse-fl1.zte.com.cn (unknown [10.30.14.238]) by Forcepoint Email with ESMTPS id 447B0E2D470FAD69E41C; Wed, 23 Oct 2019 16:31:46 +0800 (CST) Received: from notes_smtp.zte.com.cn (notessmtp.zte.com.cn [10.30.1.239]) by mse-fl1.zte.com.cn with ESMTP id x9N8UNET081660; Wed, 23 Oct 2019 16:30:23 +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 2019102316304296-91731 ; Wed, 23 Oct 2019 16:30:42 +0800 From: zhongshiqi To: Julia.Lawall@lip6.fr Date: Wed, 23 Oct 2019 16:32:43 +0800 Message-Id: <1571819563-18118-1-git-send-email-zhong.shiqi@zte.com.cn> X-Mailer: git-send-email 1.8.3.1 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2019-10-23 16:30:43, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2019-10-23 16:30:26, Serialize complete at 2019-10-23 16:30:26 X-MAIL: mse-fl1.zte.com.cn x9N8UNET081660 X-Greylist: Sender IP whitelisted, Sender e-mail whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Wed, 23 Oct 2019 11:57:30 +0200 (CEST) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Wed, 23 Oct 2019 10:31:49 +0200 (CEST) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 X-Mailman-Approved-At: Wed, 23 Oct 2019 11:57:27 +0200 Cc: wang.yi59@zte.com.cn, michal.lkml@markovi.net, nicolas.palix@imag.fr, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, cheng.shengyu@zte.com.cn, zhongshiqi , cocci@systeme.lip6.fr Subject: [Cocci] [PATCH] Configuring COCCI parameter as a directory is supportted X-BeenThere: cocci@systeme.lip6.fr X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: cocci-bounces@systeme.lip6.fr Errors-To: cocci-bounces@systeme.lip6.fr 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 -- 2.9.5 _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci