Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp545452ybe; Fri, 6 Sep 2019 03:36:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+2H5S80n6PjrOozFfOdD6jIUHzBBTw1j1UnrcBpHvMyQz1TNI5B7DeE3PleXHibwbnFBv X-Received: by 2002:a62:f210:: with SMTP id m16mr702466pfh.160.1567766175144; Fri, 06 Sep 2019 03:36:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567766175; cv=none; d=google.com; s=arc-20160816; b=QCjGvEZLkalm35Uxk61xx0cfCFiID1MHQHkdm9Z14gyo6D4INPw5cldSzDkwbmSSe/ yvvS3Qu2oHHo+XyBlsQR1OIwFCMr0snW+oYqHLY9HndYPJ/Vg0IBiL+BqNVadYf/5e3W 96uidX4w/wgBkcyTrtQg276OB0mY71pTSLg+qEQCbyAuucO+EsCfIQ2wMyCc1cPd9Oft u+4147l3EsIg7r4Grv0apHC2avvKWMCxa4HkIjNLUuUROfVCiLybL8R1ippQl4VvuKdS 05W8ptddnYJlyLY4owbdwPgdJEnIjhQLdh0PA62JreN7AR2QO9NogHctOBQjF2IbouMp 7jtw== 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=KielrQk6SPCRZl++4BR4vnsxW2WymOCIZuxMoFdicC0=; b=d6jwJ0eQFRNXQbus4NLlqsCZT2YBUOtToUTdFfa1CwKoB0KgmSSTDK8bZe8GzX6x59 yFoOrGoNjO96EKaQ+7WjgHIsIdjjZLJiIzLD/RBAzlZNU+3BPtb/HErizsH4yOrShYwz S5a4iUeX8Fow9ekGpIef/giGfbf3Jk/hlAeqoxK54GIIxpkmx0tkYUMQqUwkTUc+8U5/ 8QXAh0bZZFQve5BkuyWz6hYf1Bx/LS7GomGdUo2GDS/Aant1p0cy/Y4xrW38Occ4SatO uq3yjZYHBN8EOhX0Xsj+OBrrykjyHp3ZQWr99rH+MIHcVkl5F7JsjQ8TV58u7MRK9zWL 6I4g== 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 t6si4606190pjy.39.2019.09.06.03.35.58; Fri, 06 Sep 2019 03:36:15 -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 S2392241AbfIFFKB (ORCPT + 99 others); Fri, 6 Sep 2019 01:10:01 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:39181 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389949AbfIFFKB (ORCPT ); Fri, 6 Sep 2019 01:10:01 -0400 X-IronPort-AV: E=Sophos;i="5.64,472,1559512800"; d="scan'208";a="318467270" Received: from abo-12-105-68.mrs.modulonet.fr (HELO hadrien) ([85.68.105.12]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Sep 2019 07:09:56 +0200 Date: Fri, 6 Sep 2019 07:09:56 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: YueHaibing cc: Gilles Muller , nicolas.palix@imag.fr, michal.lkml@markovi.net, gregkh@linuxfoundation.org, swboyd@chromium.org, cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] coccinelle: platform_get_irq: Fix parse error In-Reply-To: <20190906033006.17616-1-yuehaibing@huawei.com> Message-ID: References: <20190906033006.17616-1-yuehaibing@huawei.com> 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 Fri, 6 Sep 2019, YueHaibing wrote: > When do coccicheck, I get this error: > > spatch -D report --no-show-diff --very-quiet --cocci-file > ./scripts/coccinelle/api/platform_get_irq.cocci --include-headers > --dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include > -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi > -I ./include/uapi -I ./include/generated/uapi > --include ./include/linux/kconfig.h --jobs 192 --chunksize 1 > minus: parse error: > File "./scripts/coccinelle/api/platform_get_irq.cocci", line 24, column 9, charpos = 355 > around = '\(', > whole content = if ( ret \( < \| <= \) 0 ) > > In commit e56476897448 ("fpga: Remove dev_err() usage > after platform_get_irq()") log, I found the semantic patch, > it fix this issue. Thanks very much for reporting the problem. Acked-by: Julia Lawall > > Fixes: 98051ba2b28b ("coccinelle: Add script to check for platform_get_irq() excessive prints") > Signed-off-by: YueHaibing > --- > scripts/coccinelle/api/platform_get_irq.cocci | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/scripts/coccinelle/api/platform_get_irq.cocci b/scripts/coccinelle/api/platform_get_irq.cocci > index f6e1afc..06b6a95 100644 > --- a/scripts/coccinelle/api/platform_get_irq.cocci > +++ b/scripts/coccinelle/api/platform_get_irq.cocci > @@ -21,7 +21,7 @@ platform_get_irq > platform_get_irq_byname > )(E, ...); > > -if ( ret \( < \| <= \) 0 ) > +if ( \( ret < 0 \| ret <= 0 \) ) > { > ( > if (ret != -EPROBE_DEFER) > @@ -47,7 +47,7 @@ platform_get_irq > platform_get_irq_byname > )(E, ...); > > -if ( ret \( < \| <= \) 0 ) > +if ( \( ret < 0 \| ret <= 0 \) ) > { > ( > -if (ret != -EPROBE_DEFER) > @@ -74,7 +74,7 @@ platform_get_irq > platform_get_irq_byname > )(E, ...); > > -if ( ret \( < \| <= \) 0 ) > +if ( \( ret < 0 \| ret <= 0 \) ) > { > ( > if (ret != -EPROBE_DEFER) > -- > 2.7.4 > > >