All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Gilles Muller <Gilles.Muller@lip6.fr>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	Wen Yang <wen.yang99@zte.com.cn>,
	cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org,
	Yi Wang <wang.yi59@zte.com.cn>
Subject: Re: [3/5] Coccinelle: put_device: Merge four SmPL when constraints into one
Date: Mon, 13 May 2019 13:51:39 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1905131350330.1009@hadrien> (raw)
In-Reply-To: <1c36d747-ac2d-0187-ddb7-d1a2bb18ddaf@web.de>



On Mon, 13 May 2019, Markus Elfring wrote:

> >> 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.
>
> I find this rejection questionable.
>
>
> > This exceeds 80 characters
>
> The line became 105 characters long.
> 14 space characters can eventually be omitted.
>
>
> > and provides no readability benefit.
>
> I try to stress SmPL functionality in this use case.

That's not the goal of the semantic patches in the kernel.

The rule is fine as it is.

> >> +++ 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) \)
>
> How do you think about to extend the Coccinelle software in the way
> that such a detailed constraint can be specified on separate lines
> (without duplicated SmPL code)?

This causes some ambiguities in the parser.  No change is likely to occur
here.

julia

>
> How long will it take to reconsider corresponding software limitations?
>
> Regards,
> Markus
>

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall@lip6.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Yi Wang <wang.yi59@zte.com.cn>,
	Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	linux-kernel@vger.kernel.org, Wen Yang <wen.yang99@zte.com.cn>,
	cocci@systeme.lip6.fr
Subject: Re: [Cocci] [3/5] Coccinelle: put_device: Merge four SmPL when constraints into one
Date: Mon, 13 May 2019 13:51:39 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1905131350330.1009@hadrien> (raw)
In-Reply-To: <1c36d747-ac2d-0187-ddb7-d1a2bb18ddaf@web.de>



On Mon, 13 May 2019, Markus Elfring wrote:

> >> 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.
>
> I find this rejection questionable.
>
>
> > This exceeds 80 characters
>
> The line became 105 characters long.
> 14 space characters can eventually be omitted.
>
>
> > and provides no readability benefit.
>
> I try to stress SmPL functionality in this use case.

That's not the goal of the semantic patches in the kernel.

The rule is fine as it is.

> >> +++ 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) \)
>
> How do you think about to extend the Coccinelle software in the way
> that such a detailed constraint can be specified on separate lines
> (without duplicated SmPL code)?

This causes some ambiguities in the parser.  No change is likely to occur
here.

julia

>
> How long will it take to reconsider corresponding software limitations?
>
> Regards,
> Markus
>
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2019-05-13 11:51 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-23  6:14 [PATCH] coccinelle: put_device: reduce false positives Wen Yang
2019-03-23  6:14 ` [Cocci] " Wen Yang
2019-03-23 13:41 ` Julia Lawall
2019-03-23 13:41   ` [Cocci] " Julia Lawall
2019-03-23 19:44 ` Markus Elfring
2019-03-23 19:44   ` [Cocci] " Markus Elfring
2019-03-23 19:44   ` Markus Elfring
2019-03-23 20:06   ` Julia Lawall
2019-03-23 20:06     ` [Cocci] " Julia Lawall
2019-03-23 20:06     ` Julia Lawall
2019-03-26  8:45     ` Dan Carpenter
2019-03-26  8:45       ` [Cocci] " Dan Carpenter
2019-03-26  8:45       ` Dan Carpenter
2019-03-26  9:38       ` Julia Lawall
2019-03-26  9:38         ` [Cocci] " Julia Lawall
2019-03-26  9:38         ` Julia Lawall
2019-03-26 10:11         ` Dan Carpenter
2019-03-26 10:11           ` [Cocci] " Dan Carpenter
2019-03-26 10:11           ` Dan Carpenter
2019-03-26 10:15           ` Julia Lawall
2019-03-26 10:15             ` [Cocci] " Julia Lawall
2019-03-26 10:15             ` Julia Lawall
2019-03-28 13:08             ` Masahiro Yamada
2019-03-28 13:08               ` [Cocci] " Masahiro Yamada
2019-03-28 13:08               ` Masahiro Yamada
2019-03-28 14:19               ` Julia Lawall
2019-03-28 14:19                 ` [Cocci] " Julia Lawall
2019-03-28 14:19                 ` Julia Lawall
2019-04-01  6:44               ` Coccinelle: " Markus Elfring
2019-04-01  6:44                 ` [Cocci] " Markus Elfring
2019-04-01  6:44                 ` Markus Elfring
2019-04-01 20:04                 ` Julia Lawall
2019-04-01 20:04                   ` [Cocci] " Julia Lawall
2019-04-01 20:04                   ` Julia Lawall
2019-05-13  8:55 ` [PATCH 0/5] Coccinelle: put_device: Adjustments for a SmPL script Markus Elfring
2019-05-13  8:55   ` [Cocci] " Markus Elfring
2019-05-13  8:59   ` [PATCH 1/5] Coccinelle: put_device: Adjust a message construction Markus Elfring
2019-05-13  8:59     ` [Cocci] " Markus Elfring
2019-05-13  9:35     ` Julia Lawall
2019-05-13  9:35       ` [Cocci] " Julia Lawall
2019-05-13 11:33       ` [1/5] " Markus Elfring
2019-05-13 11:33         ` [Cocci] " Markus Elfring
2019-05-13 11:36         ` Julia Lawall
2019-05-13 11:36           ` [Cocci] " Julia Lawall
2019-05-13 12:48           ` Markus Elfring
2019-05-13 12:48             ` [Cocci] " Markus Elfring
2019-07-06 13:13     ` [Cocci] [PATCH 1/5] " Masahiro Yamada
2019-07-06 13:13       ` Masahiro Yamada
2019-05-13  9:01   ` [PATCH 2/5] Coccinelle: put_device: Add a cast to an expression for an assignment Markus Elfring
2019-05-13  9:01     ` [Cocci] " Markus Elfring
2019-05-13  9:33     ` Julia Lawall
2019-05-13  9:33       ` [Cocci] " Julia Lawall
2019-07-06 13:13     ` Masahiro Yamada
2019-07-06 13:13       ` Masahiro Yamada
2019-05-13  9:05   ` [PATCH 3/5] Coccinelle: put_device: Merge four SmPL when constraints into one Markus Elfring
2019-05-13  9:05     ` [Cocci] " Markus Elfring
2019-05-13  9:32     ` Julia Lawall
2019-05-13  9:32       ` [Cocci] " Julia Lawall
2019-05-13 11:48       ` [3/5] " Markus Elfring
2019-05-13 11:48         ` [Cocci] " Markus Elfring
2019-05-13 11:48       ` Markus Elfring
2019-05-13 11:48         ` [Cocci] " Markus Elfring
2019-05-13 11:51         ` Julia Lawall [this message]
2019-05-13 11:51           ` Julia Lawall
2019-05-13 12:52           ` Markus Elfring
2019-05-13 12:52             ` [Cocci] " Markus Elfring
2019-05-13  9:07   ` [PATCH 4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses Markus Elfring
2019-05-13  9:07     ` [Cocci] " Markus Elfring
2019-05-13  9:31     ` Julia Lawall
2019-05-13  9:31       ` [Cocci] " Julia Lawall
2019-05-13 12:22       ` [4/5] " Markus Elfring
2019-05-13 12:22         ` [Cocci] " Markus Elfring
2019-05-14  5:55       ` Markus Elfring
2019-05-14  5:55         ` [Cocci] " Markus Elfring
2019-05-14  6:52         ` Julia Lawall
2019-05-14  6:52           ` [Cocci] " Julia Lawall
2019-05-14  7:49           ` Markus Elfring
2019-05-14  7:49             ` [Cocci] " Markus Elfring
2019-05-14  9:18             ` [Cocci] [4/5] Coccinelle: put_device: Extend when constraints for twoSmPL ellipses wen.yang99
2019-05-14  9:51               ` Markus Elfring
2019-05-14  9:51                 ` [Cocci] " Markus Elfring
2019-05-15 17:09               ` [4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses Markus Elfring
2019-05-14  7:49           ` Markus Elfring
2019-05-14  7:49             ` [Cocci] " Markus Elfring
2019-05-13  9:07   ` [PATCH 4/5] " Markus Elfring
2019-05-13  9:07     ` [Cocci] " Markus Elfring
2019-05-13  9:10   ` [PATCH 5/5] Coccinelle: put_device: Merge two SmPL when constraints into one Markus Elfring
2019-05-13  9:10     ` [Cocci] " Markus Elfring
2019-05-13  9:30     ` Julia Lawall
2019-05-13  9:30       ` [Cocci] " Julia Lawall
2019-05-13 12:35       ` [5/5] " Markus Elfring
2019-05-13 12:35         ` [Cocci] " Markus Elfring

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.20.1905131350330.1009@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=Gilles.Muller@lip6.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=nicolas.palix@imag.fr \
    --cc=wang.yi59@zte.com.cn \
    --cc=wen.yang99@zte.com.cn \
    --cc=yamada.masahiro@socionext.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.