提交 c420970e 编写于 作者: M Mathieu Desnoyers 提交者: Ingo Molnar

tracepoints: use unregister return value

Impact: bugfix.

Unregistering a tracepoint can fail. Return the error value.
Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 da7b3eab
......@@ -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_range(struct tracepoint *begin,
{ \
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册