Messages in this thread Patch in this message | | | Date | Fri, 14 Nov 2008 17:47:44 -0500 | From | Mathieu Desnoyers <> | Subject | [patch 11/16] Tracepoint Use Unregister Return Value |
| |
Unregistering a tracepoint can fail. Return the error value.
Impact: bugfix.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: 'Ingo Molnar' <mingo@elte.hu> CC: Lai Jiangshan <laijs@cn.fujitsu.com> --- include/linux/tracepoint.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Index: linux-2.6-lttng/include/linux/tracepoint.h =================================================================== --- linux-2.6-lttng.orig/include/linux/tracepoint.h 2008-09-19 22:40:43.000000000 -0400 +++ linux-2.6-lttng/include/linux/tracepoint.h 2008-09-19 23:03:20.000000000 -0400 @@ -73,9 +73,9 @@ struct tracepoint { return tracepoint_probe_register(#name ":" #proto, \ (void *)probe); \ } \ - static inline void unregister_trace_##name(void (*probe)(proto))\ + static inline int unregister_trace_##name(void (*probe)(proto)) \ { \ - tracepoint_probe_unregister(#name ":" #proto, \ + return tracepoint_probe_unregister(#name ":" #proto, \ (void *)probe); \ } @@ -92,8 +92,10 @@ extern void tracepoint_update_probe_rang { \ return -ENOSYS; \ } \ - static inline void unregister_trace_##name(void (*probe)(proto))\ - { } + static inline int unregister_trace_##name(void (*probe)(proto)) \ + { \ + return -ENOSYS; \ + } static inline void tracepoint_update_probe_range(struct tracepoint *begin, struct tracepoint *end) -- Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
| |