Re: [2/3] Coccinelle: pci_free_consistent: Reduce a bit of duplicate SmPL code

2019-05-14 Thread Markus Elfring
>> A return statement was specified with a known value for three branches >> of a SmPL disjunction. >> Reduce duplicate SmPL code there by using another disjunction for >> these return values. … > NACK. The goak is not to squeeze the most information into the fewest > number of characters. Can

Re: [1/3] Coccinelle: pci_free_consistent: Use formatted strings directly in SmPL rules

2019-05-14 Thread Markus Elfring
> NACK. If the code is going to change, I would rather it come closer to > staying within 80 characters. Do you really prefer then to deviate from the Linux coding style at such source code places? Would you like to split affected string literals over multiple lines? Regards, Markus

Re: [PATCH 3/3] Coccinelle: pci_free_consistent: Extend when constraints for two SmPL ellipses

2019-05-14 Thread Julia Lawall
On Tue, 14 May 2019, Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 14 May 2019 18:12:15 +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/3] Coccinelle: pci_free_consistent: Use formatted strings directly in SmPL rules

2019-05-14 Thread Julia Lawall
On Tue, 14 May 2019, Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 14 May 2019 16:54:40 +0200 > > Formatted strings were always assigned to the Python variable “msg” > before they were used in two rules of a script for the semantic > patch language. > Delete these extra variables

Re: [PATCH 2/3] Coccinelle: pci_free_consistent: Reduce a bit of duplicate SmPL code

2019-05-14 Thread Julia Lawall
On Tue, 14 May 2019, Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 14 May 2019 17:18:24 +0200 > > A return statement was specified with a known value for three branches > of a SmPL disjunction. > Reduce duplicate SmPL code there by using another disjunction for > these return

[PATCH 3/3] Coccinelle: pci_free_consistent: Extend when constraints for two SmPL ellipses

2019-05-14 Thread Markus Elfring
From: Markus Elfring Date: Tue, 14 May 2019 18:12:15 +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/3] Coccinelle: pci_free_consistent: Reduce a bit of duplicate SmPL code

2019-05-14 Thread Markus Elfring
From: Markus Elfring Date: Tue, 14 May 2019 17:18:24 +0200 A return statement was specified with a known value for three branches of a SmPL disjunction. Reduce duplicate SmPL code there by using another disjunction for these return values. Signed-off-by: Markus Elfring ---

[PATCH 2/3] Coccinelle: pci_free_consistent: Reduce a bit of duplicate SmPL code

2019-05-14 Thread Markus Elfring
From: Markus Elfring Date: Tue, 14 May 2019 17:18:24 +0200 A return statement was specified with a known value for three branches of a SmPL disjunction. Reduce duplicate SmPL code there by using another disjunction for these return values. Signed-off-by: Markus Elfring ---

[PATCH 1/3] Coccinelle: pci_free_consistent: Use formatted strings directly in SmPL rules

2019-05-14 Thread Markus Elfring
From: Markus Elfring Date: Tue, 14 May 2019 16:54:40 +0200 Formatted strings were always assigned to the Python variable “msg” before they were used in two rules of a script for the semantic patch language. Delete these extra variables so that the specified string objects are directly used for

Re: [4/5] Coccinelle: put_device: Extend when constraints for twoSmPL ellipses

2019-05-14 Thread Markus Elfring
> I did another experiment at that time and found that this modification will > reduce the false positive rate, Thanks for such feedback. Will my update suggestion influence the current (or future) software situation? > but it may also reduce the recall rate. Would you like to explain this

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

2019-05-14 Thread wen.yang99
> Subject: Re: [4/5] Coccinelle: put_device: Extend when constraints for > twoSmPL ellipses > >> Can you agree to any information which I presented in the commit message? > > Do you find this description inappropriate? > > > >>> You don't need so many type metavariables. > >> > >> It seems

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

2019-05-14 Thread Markus Elfring
>> Can you agree to any information which I presented in the commit message? Do you find this description inappropriate? >>> You don't need so many type metavariables. >> >> It seems that the Coccinelle software can cope also with my SmPL code >> addition. >> You might feel uncomfortable with

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

2019-05-14 Thread Markus Elfring
>> Can you agree to any information which I presented in the commit message? Do you find this description inappropriate? >>> You don't need so many type metavariables. >> >> It seems that the Coccinelle software can cope also with my SmPL code >> addition. >> You might feel uncomfortable with