tracepoints: Add check trace callback type
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 30 Apr 2010 16:59:59 +0000 (12:59 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 14 May 2010 13:34:26 +0000 (09:34 -0400)
commit53da59aa6dd881fd0bbdd058a8a299d90ce9dd1d
tree53b68f57d815025ee6f97900544b4cfecca0d78d
parent8f0820183056ad26dabc0202115848a92f1143fc
tracepoints: Add check trace callback type

This check is meant to be used by tracepoint users which do a direct cast of
callbacks to (void *) for direct registration, thus bypassing the
register_trace_##name and unregister_trace_##name checks.

This permits to ensure that the callback type matches the function type at the
call site, but without generating any code.

Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
LKML-Reference: <20100430165959.GA25605@Krystal>
CC: Ingo Molnar <mingo@elte.hu>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Arnaldo Carvalho de Melo <acme@redhat.com>
CC: Lai Jiangshan <laijs@cn.fujitsu.com>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
include/linux/tracepoint.h