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.


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, ...) {
  ... when any
  ... when any

Many thanks!


Cocci mailing list

Reply via email to