Re: [Cocci] [4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses

2019-05-13 Thread Markus Elfring
>> A SmPL ellipsis was specified for a search approach so that additional >> source code would be tolerated between an assignment to a local variable >> and the corresponding null pointer check. >> >> But such code should be restricted. >> * The local variable must not be reassigned there. >> * It

Re: [3/5] Coccinelle: put_device: Merge four SmPL when constraints into one

2019-05-13 Thread Markus Elfring
>> 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. I am curious under which circumstances other software aspects can become more relevant (as suggested). Regards, Markus

Re: [5/5] Coccinelle: put_device: Merge two SmPL when constraints into one

2019-05-13 Thread Markus Elfring
>> Combine the exclusion specifications into a disjunction for the semantic >> patch language so that this argument is referenced only once there. … > NACK. This hurts readability I suggest to reconsider such readability concerns once more. Can corresponding software limitations be adjusted any

Re: [Cocci] [4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses

2019-05-13 Thread Markus Elfring
>> Take additional casts for these code exclusion specifications into account >> together with optional parentheses. > > NACK. I find this rejection surprising. > You don't need so many type metavariables. I got an other software development opinion for this aspect. Yesterday we started to

Re: [Cocci] [3/5] Coccinelle: put_device: Merge four SmPL when constraints into one

2019-05-13 Thread Julia Lawall
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

Re: [Cocci] [3/5] Coccinelle: put_device: Merge four SmPL when constraints into one

2019-05-13 Thread Markus Elfring
>> 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

Re: [Cocci] [1/5] Coccinelle: put_device: Adjust a message construction

2019-05-13 Thread Julia Lawall
On Mon, 13 May 2019, Markus Elfring wrote: > >> Thus simplify a message construction in a SmPL rule by concatenating text > >> with two plus operators less. > > > > Is there any way to unindent, so that the string doesn't exceed 80 > > characters, > > or at least no so much? > > How does your

Re: [1/5] Coccinelle: put_device: Adjust a message construction

2019-05-13 Thread Markus Elfring
>> Thus simplify a message construction in a SmPL rule by concatenating text >> with two plus operators less. > > Is there any way to unindent, so that the string doesn't exceed 80 characters, > or at least no so much? How does your concern fit to the string literal tolerance from the Linux

Re: [Cocci] [PATCH 2/5] Coccinelle: put_device: Add a cast to an expression for an assignment

2019-05-13 Thread Julia Lawall
On Mon, 13 May 2019, Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 8 May 2019 13:50:49 +0200 > > Extend a when constraint in a SmPL rule so that an additional cast > is optionally excluded from source code searches for an expression > in assignments. Acked-by: Julia Lawall > >

Re: [Cocci] [PATCH 4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses

2019-05-13 Thread Julia Lawall
On Mon, 13 May 2019, Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 13 May 2019 09:47:17 +0200 > > A SmPL ellipsis was specified for a search approach so that additional > source code would be tolerated between an assignment to a local variable > and the corresponding null pointer

Re: [PATCH 1/5] Coccinelle: put_device: Adjust a message construction

2019-05-13 Thread Julia Lawall
On Mon, 13 May 2019, Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 7 May 2019 11:20:48 +0200 > > The Linux coding style tolerates long string literals so that > the provided information can be easier found also by search tools > like grep. > Thus simplify a message construction in

Re: [PATCH 3/5] Coccinelle: put_device: Merge four SmPL when constraints into one

2019-05-13 Thread Julia Lawall
On Mon, 13 May 2019, Markus Elfring wrote: > From: Markus Elfring > 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

Re: [PATCH 5/5] Coccinelle: put_device: Merge two SmPL when constraints into one

2019-05-13 Thread Julia Lawall
On Mon, 13 May 2019, Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 13 May 2019 09:55:22 +0200 > > A single parameter was repeated for a function call in two SmPL > when constraints. > Combine the exclusion specifications into a disjunction for the semantic > patch language so that

[Cocci] [PATCH 4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses

2019-05-13 Thread Markus Elfring
From: Markus Elfring Date: Mon, 13 May 2019 09:47:17 +0200 A SmPL ellipsis was specified for a search approach so that additional source code would be tolerated between an assignment to a local variable and the corresponding null pointer check. But such code should be restricted. * The local

[Cocci] [PATCH 5/5] Coccinelle: put_device: Merge two SmPL when constraints into one

2019-05-13 Thread Markus Elfring
From: Markus Elfring Date: Mon, 13 May 2019 09:55:22 +0200 A single parameter was repeated for a function call in two SmPL when constraints. Combine the exclusion specifications into a disjunction for the semantic patch language so that this argument is referenced only once there.

[Cocci] [PATCH 4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses

2019-05-13 Thread Markus Elfring
From: Markus Elfring Date: Mon, 13 May 2019 09:47:17 +0200 A SmPL ellipsis was specified for a search approach so that additional source code would be tolerated between an assignment to a local variable and the corresponding null pointer check. But such code should be restricted. * The local

[PATCH 2/5] Coccinelle: put_device: Add a cast to an expression for an assignment

2019-05-13 Thread Markus Elfring
From: Markus Elfring Date: Wed, 8 May 2019 13:50:49 +0200 Extend a when constraint in a SmPL rule so that an additional cast is optionally excluded from source code searches for an expression in assignments. Signed-off-by: Markus Elfring Suggested-by: Julia Lawall Link:

[PATCH 1/5] Coccinelle: put_device: Adjust a message construction

2019-05-13 Thread Markus Elfring
From: Markus Elfring Date: Tue, 7 May 2019 11:20:48 +0200 The Linux coding style tolerates long string literals so that the provided information can be easier found also by search tools like grep. Thus simplify a message construction in a SmPL rule by concatenating text with two plus operators

[PATCH 0/5] Coccinelle: put_device: Adjustments for a SmPL script

2019-05-13 Thread Markus Elfring
Some adjustments were discussed also for this script a while ago. The software development attention evolved in a special way in the meantime. See also for further background information: https://lore.kernel.org/lkml/cak7lnatjasisezotz57zbhse0j5zyy_12zq0gaf_ocziuwh...@mail.gmail.com/