Okay, another problem (probably my last) - and again failure to achieve.

@ r0 @ identifier fn_ptr; @@
void (*fn_ptr)(...);
...
void arch_reset(...)
{
<...
        fn_ptr(...);
...>
}

Produces:

init_defs_builtins: /usr/share/coccinelle/standard.h
Fatal error: exception Failure("minus: parse error:
 = File "arch_reset-2.cocci", line 4, column 5,  charpos = 59
    around = 'arch_reset', whole content = void arch_reset(...)
")

I don't understand why its telling me it can't parse that.

I have this:

void (*at91_arch_reset)(void);

static inline void arch_reset(char mode, const char *cmd)
{
        /* call the CPU-specific reset function */
        if (at91_arch_reset)
                (at91_arch_reset)();
}

(see arch/arm/mach-at91/include/mach/system.h)

where at91_arch_reset can be assigned a pointer to a function elsewhere
in arch/arm/mach-at91, and:

void (*arch_reset)(char, const char *);

(see arch/arm/plat-omap/include/plat/system.h)

and:

static inline void arch_reset(char mode, const char *cmd)
{
...
}

(see almost any other arch/arm/*/include/*/system.h header.)

and I want to apply a set of transformations to _all_ of those functions.
Is this possible with coccinelle?  So far my attempts with it suggest that
it's impossible.

-- 
Russell King
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to