Hi all,
I want to write a script to match function calls in macros
but I don't know how to do that.
Here is an example:
#define __INIT_WORK(_work, _func, _onstack) \
do { \
static struct lock_class_key __key; \
\
__init_work((_work), _onstack); \
(_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
lockdep_init_map(&(_work)->lockdep_map,
"(work_completion)"#_work, &__key, 0); \
INIT_LIST_HEAD(&(_work)->entry); \
(_work)->func = (_func); \
} while (0)
In this example, I want to match function calls
like __init_work() and lockdep_init_map() in this macro.
So how to implement this by Coccinelle?
Thanks,
Chuhong
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci