[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1905131132250.3616@hadrien>
Date: Mon, 13 May 2019 11:32:45 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: Markus Elfring <Markus.Elfring@....de>
cc: Julia Lawall <julia.lawall@...6.fr>,
Gilles Muller <Gilles.Muller@...6.fr>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Nicolas Palix <nicolas.palix@...g.fr>,
Wen Yang <wen.yang99@....com.cn>, cocci@...teme.lip6.fr,
linux-kernel@...r.kernel.org, Yi Wang <wang.yi59@....com.cn>
Subject: Re: [PATCH 3/5] Coccinelle: put_device: Merge four SmPL when
constraints into one
On Mon, 13 May 2019, Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sun, 12 May 2019 18:32:46 +0200
>
> An assignment target was repeated in four SmPL when constraints.
> Combine the exclusion specifications into disjunctions for the semantic
> patch language so that this target is referenced only once there.
NACK. This exceeds 80 characters and provides no readability benefit.
julia
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
> scripts/coccinelle/free/put_device.cocci | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/scripts/coccinelle/free/put_device.cocci b/scripts/coccinelle/free/put_device.cocci
> index 120921366e84..aae79c02c1e0 100644
> --- a/scripts/coccinelle/free/put_device.cocci
> +++ b/scripts/coccinelle/free/put_device.cocci
> @@ -23,10 +23,7 @@ if (id == NULL || ...) { ... return ...; }
> when != platform_device_put(id)
> when != of_dev_put(id)
> when != if (id) { ... put_device(&id->dev) ... }
> - when != e1 = (T)id
> - when != e1 = (T)(&id->dev)
> - when != e1 = get_device(&id->dev)
> - when != e1 = (T1)platform_get_drvdata(id)
> + when != e1 = \( (T) \( id \| (&id->dev) \) \| get_device(&id->dev) \| (T1)platform_get_drvdata(id) \)
> (
> return
> ( id
> --
> 2.21.0
>
>
Powered by blists - more mailing lists