On Tue, 28 Feb 2012, ron minnich wrote:
This worked for me. I am sure it's not optimal, but it works :-)
The reason I am guessing is that coccinelle wants to see a function
defined before it will also generate patches for the prototype? Just
guessing.
Indeed, the prototype rule inherits the function name from the function
matching rule, since normally one doesn't want to change all prototypes.
If you do want to change them all, this approach will be more efficient.
julia
ron
@@
identifier func;
identifier d;
type T;
@@
T
-func(struct drm_device *d)
+func(void)
{...}
@@
identifier dev;
expression i;
@@
-struct drm_i915_private *dev = i;
@@
identifier func;
identifier d;
type T;
@@
T
-func(struct drm_device *d)
+func(void)
;
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)