From: Julia Lawall <julia.lawall@lip6.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Michal Marek <michal.lkml@markovi.net>,
Nicolas Palix <nicolas.palix@imag.fr>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
cocci@systeme.lip6.fr
Subject: Re: [Cocci] [PATCH 2/4] coccinelle: platform_get_irq: handle 2-statement branches
Date: Tue, 19 Nov 2019 22:36:51 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.21.1911192235010.2592@hadrien> (raw)
In-Reply-To: <d178b6b3-7ef1-4ad7-a747-d65249a9667a@web.de>
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
On Tue, 19 Nov 2019, Markus Elfring wrote:
> > From: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> I wonder about this information.
> Would you like to use the tag “Suggested-by” instead?
Sorry, I seem to have done something quite wrong on this patch. I will
fix it.
>
>
> …
> > +++ b/scripts/coccinelle/api/platform_get_irq.cocci
> > @@ -31,6 +31,25 @@ if ( \( ret < 0 \| ret <= 0 \) )
> …
> > +ret =
> > +(
> > +platform_get_irq
> > +|
> > +platform_get_irq_byname
> > +)(E, ...);
> > +
> > +if ( \( ret < 0 \| ret <= 0 \) )
> > +-{
> > +-dev_err(...);
> > +S
> > +-}
>
> How do you think about to use the following SmPL code variant?
And the benefit is what?
julia
> + ret =
> +(platform_get_irq
> +|platform_get_irq_byname
> +)(E, ...);
> +
> + if ( \( ret < 0 \| ret <= 0 \) )
> +-{
> +-dev_err(...);
> + S
> +-}
>
> Regards,
> Markus
>
[-- Attachment #2: Type: text/plain, Size: 136 bytes --]
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next prev parent reply other threads:[~2019-11-19 21:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-19 17:28 [Cocci] [PATCH 0/4] improve platform_get_irq.cocci Julia Lawall
2019-11-19 17:28 ` [Cocci] [PATCH 1/4] coccinelle: platform_get_irq: simplify context case Julia Lawall
2019-11-19 17:28 ` [Cocci] [PATCH 2/4] coccinelle: platform_get_irq: handle 2-statement branches Julia Lawall
2019-11-19 21:33 ` Markus Elfring
2019-11-19 21:36 ` Julia Lawall [this message]
2019-11-20 9:38 ` [Cocci] [2/4] " Markus Elfring
2019-11-19 21:33 ` [Cocci] [PATCH 2/4] " Markus Elfring
2019-11-19 17:28 ` [Cocci] [PATCH 3/4] coccinelle: platform_get_irq: allow multiple dev_errs Julia Lawall
2019-11-19 17:28 ` [Cocci] [PATCH 4/4] coccinelle: platform_get_irq: drop unneeded metavariable 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=alpine.DEB.2.21.1911192235010.2592@hadrien \
--to=julia.lawall@lip6.fr \
--cc=Markus.Elfring@web.de \
--cc=cocci@systeme.lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
/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).