Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp543679ybe; Fri, 6 Sep 2019 03:34:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIsUofWAPwr1V4rpN8isgypuMPEfDmaFcIz3hpamWi8S3an+rK/y5IboXNUGg1Knpz6JvQ X-Received: by 2002:a62:5f83:: with SMTP id t125mr9797571pfb.125.1567766068015; Fri, 06 Sep 2019 03:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567766068; cv=none; d=google.com; s=arc-20160816; b=uc84DtswAIOLZa/e7qn39alz5IZx3M8jjPLOP8Rb+yOEgLHWKlzPHVjqaFLHLhqu5N Nj8VbDhKEFDnEDCam2l52gK881FctNgIDSQnVQfplFAoLI+6m2Vf1H8l034LZU5phkxx GW0MD8N4nnYOvmQNPu82bq8XN/ezQuiehlIVkrSSeNEr5BRV/2NjN6qd6UAE79F/cgbV qC8n1GifLy1YwxLXPwwRW7KDwfnHEdfOkqLFUfkHCgg7Gah+jXdaVewwydEGHM8Isito aTl3gaPe1Vv6KHkpVdC6bOyjB/5VS0QGA8f/g3q0+LMbZWblaKul4sEBeCx3IN+FFuq0 H9ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=3705QV1Np7nCj7213wHG8pDMSZQ7vEvwoT7yGBIsBj4=; b=WhrIhswWUx5BCJnzo3TX8EwuQbQWMcLJv3Fy8so0uO7vdIOCPhElLgStscMpq+dUVL kgngiVjLrf0v8UnntYIzb7guhyTwBj2xyLxsuqPWj8eiPz8kAIVbJ7EORnOb0vRytAIY 2zQ4xMQfrpISA4IiQXZ7XxbwHOoTfgJj19dxGVzjleHhA1dXExpd2NKK4lbZToSS2m6T u/kuomppOJFk4V/tTVEtbu+1F8RP5cykOBnZzuySHUGUsRXRXp8QDriABSb48p1wLoyC 4aM8fh1WXFVt4zCwy5reIcDCkc+QjDBKNZPw882khwYClLQwjhdUd4kAd5gp6KgxznDg 3EoA== 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 k9si5620090pfp.155.2019.09.06.03.34.12; Fri, 06 Sep 2019 03:34:28 -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 S2392113AbfIFDa1 (ORCPT + 99 others); Thu, 5 Sep 2019 23:30:27 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:50452 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2392106AbfIFDa1 (ORCPT ); Thu, 5 Sep 2019 23:30:27 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1505E259FF9CE83B7552; Fri, 6 Sep 2019 11:30:26 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.439.0; Fri, 6 Sep 2019 11:30:18 +0800 From: YueHaibing To: , , , , , , CC: , Subject: [PATCH -next] coccinelle: platform_get_irq: Fix parse error Date: Fri, 6 Sep 2019 11:30:06 +0800 Message-ID: <20190906033006.17616-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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