[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1911192235010.2592@hadrien>
Date: Tue, 19 Nov 2019 22:36:51 +0100 (CET)
From: Julia Lawall <julia.lawall@...6.fr>
To: Markus Elfring <Markus.Elfring@....de>
cc: Julia Lawall <julia.lawall@...6.fr>, cocci@...teme.lip6.fr,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
Gilles Muller <Gilles.Muller@...6.fr>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Nicolas Palix <nicolas.palix@...g.fr>
Subject: Re: [PATCH 2/4] coccinelle: platform_get_irq: handle 2-statement
branches
On Tue, 19 Nov 2019, Markus Elfring wrote:
> > From: Masahiro Yamada <yamada.masahiro@...ionext.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
>
Powered by blists - more mailing lists