From: YueHaibing <yuehaibing@huawei.com>
To: <Julia.Lawall@lip6.fr>, <Gilles.Muller@lip6.fr>,
<nicolas.palix@imag.fr>, <michal.lkml@markovi.net>,
<gregkh@linuxfoundation.org>, <swboyd@chromium.org>,
<yuehaibing@huawei.com>
Cc: cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: [Cocci] [PATCH -next] coccinelle: platform_get_irq: Fix parse error
Date: Fri, 6 Sep 2019 11:30:06 +0800 [thread overview]
Message-ID: <20190906033006.17616-1-yuehaibing@huawei.com> (raw)
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 <yuehaibing@huawei.com>
---
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
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next reply other threads:[~2019-09-06 7:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-06 3:30 YueHaibing [this message]
2019-09-06 5:09 ` [Cocci] [PATCH -next] coccinelle: platform_get_irq: Fix parse error Julia Lawall
2019-09-06 5:15 ` Stephen Boyd
2019-09-06 6:52 ` Markus Elfring
2019-09-06 6:59 ` Julia Lawall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190906033006.17616-1-yuehaibing@huawei.com \
--to=yuehaibing@huawei.com \
--cc=Gilles.Muller@lip6.fr \
--cc=Julia.Lawall@lip6.fr \
--cc=cocci@systeme.lip6.fr \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).