On 01/13/2017 06:24 AM, Julia Lawall wrote:
Attached is a new version of pdev-simple.cocci. The rule m1 checks for
the existence of a &pdev->dev and the rule m2 checks whether there already
exists a device declaration. If the first is satisfied and the second is
not, then the transformation is made using <... ...> rather than <+...
...+> which is often nore expensive.
julia
Hi Julia,
as always, you are amazing! Both fixes work like a champ.
I was even able to get "&pdev->dev referenced at least twice" to work with
@m1 exists@
identifier initfn;
identifier pdev;
type ptype.T;
position p;
@@
initfn@p(T *pdev, ...) {
...
&pdev->dev
... when any
&pdev->dev
... when any
}
Many thanks!
Guenter
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci