2016-03-20 05:29:20

by Vaishali Thakkar

[permalink] [raw]
Subject: [PATCH] Coccinelle: setup_timer: Add space in front of parentheses

Add space in front of the offending parentheses to silent the
parse error for older Coccinelle versions. This makes the rule
usable with all Coccinelle versions.

Reported-by: Nishanth Menon <[email protected]>
Signed-off-by: Vaishali Thakkar <[email protected]>
---
scripts/coccinelle/api/setup_timer.cocci | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/coccinelle/api/setup_timer.cocci b/scripts/coccinelle/api/setup_timer.cocci
index 8ee0ac3..eb6bd9e 100644
--- a/scripts/coccinelle/api/setup_timer.cocci
+++ b/scripts/coccinelle/api/setup_timer.cocci
@@ -106,7 +106,7 @@ position j0, j1, j2;
@match_function_and_data_after_init_timer_context
depends on !patch &&
!match_immediate_function_data_after_init_timer_context &&
-(context || org || report)@
+ (context || org || report)@
expression a, b, e1, e2, e3, e4, e5;
position j0, j1, j2;
@@
@@ -127,7 +127,7 @@ position j0, j1, j2;
@r3_context depends on !patch &&
!match_immediate_function_data_after_init_timer_context &&
!match_function_and_data_after_init_timer_context &&
-(context || org || report)@
+ (context || org || report)@
expression c, e6, e7;
position r1.p;
position j0, j1;
--
2.1.4


2016-03-20 12:25:53

by Julia Lawall

[permalink] [raw]
Subject: Re: [PATCH] Coccinelle: setup_timer: Add space in front of parentheses



On Sun, 20 Mar 2016, Vaishali Thakkar wrote:

> Add space in front of the offending parentheses to silent the
> parse error for older Coccinelle versions. This makes the rule
> usable with all Coccinelle versions.
>
> Reported-by: Nishanth Menon <[email protected]>
> Signed-off-by: Vaishali Thakkar <[email protected]>

Acked-by: Julia Lawall <[email protected]>

> ---
> scripts/coccinelle/api/setup_timer.cocci | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/coccinelle/api/setup_timer.cocci b/scripts/coccinelle/api/setup_timer.cocci
> index 8ee0ac3..eb6bd9e 100644
> --- a/scripts/coccinelle/api/setup_timer.cocci
> +++ b/scripts/coccinelle/api/setup_timer.cocci
> @@ -106,7 +106,7 @@ position j0, j1, j2;
> @match_function_and_data_after_init_timer_context
> depends on !patch &&
> !match_immediate_function_data_after_init_timer_context &&
> -(context || org || report)@
> + (context || org || report)@
> expression a, b, e1, e2, e3, e4, e5;
> position j0, j1, j2;
> @@
> @@ -127,7 +127,7 @@ position j0, j1, j2;
> @r3_context depends on !patch &&
> !match_immediate_function_data_after_init_timer_context &&
> !match_function_and_data_after_init_timer_context &&
> -(context || org || report)@
> + (context || org || report)@
> expression c, e6, e7;
> position r1.p;
> position j0, j1;
> --
> 2.1.4
>
>

2016-04-12 21:25:36

by Wolfram Sang

[permalink] [raw]
Subject: Re: [Cocci] [PATCH] Coccinelle: setup_timer: Add space in front of parentheses

On Sun, Mar 20, 2016 at 10:57:32AM +0530, Vaishali Thakkar wrote:
> Add space in front of the offending parentheses to silent the
> parse error for older Coccinelle versions. This makes the rule
> usable with all Coccinelle versions.
>
> Reported-by: Nishanth Menon <[email protected]>
> Signed-off-by: Vaishali Thakkar <[email protected]>

Tested-by: Wolfram Sang <[email protected]>

Can we have this in 4.6 as a bugfix? The script is totally broken this
way.


Attachments:
(No filename) (466.00 B)
signature.asc (819.00 B)
Download all attachments

2016-04-20 07:51:55

by Michal Marek

[permalink] [raw]
Subject: Re: [PATCH] Coccinelle: setup_timer: Add space in front of parentheses

Dne 20.3.2016 v 13:25 Julia Lawall napsal(a):
>
>
> On Sun, 20 Mar 2016, Vaishali Thakkar wrote:
>
>> Add space in front of the offending parentheses to silent the
>> parse error for older Coccinelle versions. This makes the rule
>> usable with all Coccinelle versions.
>>
>> Reported-by: Nishanth Menon <[email protected]>
>> Signed-off-by: Vaishali Thakkar <[email protected]>
>
> Acked-by: Julia Lawall <[email protected]>

Applied to kbuild.git#misc.

Michal