Re: [Cocci] keeping cast affects match?

2016-02-17 Thread Wolfram Sang
> like this, it can be better to just pull the common part out into the > context. That was definately the case here. After doing that for the other three rules I had, two of them became identical :) Also, I got more matches, because there was context I had not anticipated yet. Big win! signatu

Re: [Cocci] keeping cast affects match?

2016-02-17 Thread Julia Lawall
On Wed, 17 Feb 2016, Wolfram Sang wrote: > > The isomorphism that allows ignoring a cast only works when the type > > metavariable is used only once. You uare using it twice. The fact that > > you wanted to add it indicates that you really want it to be there. > > Aha, I understand. Thank you fo

Re: [Cocci] keeping cast affects match?

2016-02-17 Thread Wolfram Sang
> The isomorphism that allows ignoring a cast only works when the type > metavariable is used only once. You uare using it twice. The fact that > you wanted to add it indicates that you really want it to be there. Aha, I understand. Thank you for the explanation! > I think that everything shoul

Re: [Cocci] keeping cast affects match?

2016-02-17 Thread Julia Lawall
On Wed, 17 Feb 2016, Wolfram Sang wrote: > Hi, > > using Coccinelle v1.04 from Debian: > > $ spatch -version > spatch version 1.0.4 with Python support and with PCRE support > > The following semantic patch produces a match with current linux-next: > > @@ > expression table, dev; > type T; > @@

[Cocci] keeping cast affects match?

2016-02-17 Thread Wolfram Sang
Hi, using Coccinelle v1.04 from Debian: $ spatch -version spatch version 1.0.4 with Python support and with PCRE support The following semantic patch produces a match with current linux-next: @@ expression table, dev; type T; @@ - (T)of_match_device(table, dev)->data + of_device_get