Skip to contentSkip to conversation

fix compile warnings: enumeration value ‘TRACE_REG_PERF_REGISTER’ not handled in switch

PATCH New Li Zhong 1 participant 1 message Feb 28, 2012 ftrace

lore
Share & tools
lore

Li Zhong

author
#0 lore raw

PATCH 1/1 fix compile warnings: enumeration value ‘TRACE_REG_PERF_REGISTER’ not handled in switch

This patch tries to fix the compile warnings:
kernel/trace/trace_events.c: In function ‘ftrace_event_reg’:
kernel/trace/trace_events.c:152: warning: enumeration value ‘TRACE_REG_PERF_REGISTER’ not handled in switch kernel/trace/trace_events.c:152: warning: enumeration value ‘TRACE_REG_PERF_UNREGISTER’ not handled in switch kernel/trace/trace_kprobe.c: In function ‘kprobe_register’:
kernel/trace/trace_kprobe.c:1899: warning: enumeration value ‘TRACE_REG_PERF_REGISTER’ not handled in switch kernel/trace/trace_kprobe.c:1899: warning: enumeration value ‘TRACE_REG_PERF_UNREGISTER’ not handled in switch

---
 include/linux/ftrace_event.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/linux/ftrace_event.h +2 -0
index c3da42d..235753d 100644
@@ -144,8 +144,10 @@ struct event_filter;
 enum trace_reg {
 	TRACE_REG_REGISTER,
 	TRACE_REG_UNREGISTER,
+#ifdef CONFIG_PERF_EVENTS
 	TRACE_REG_PERF_REGISTER,
 	TRACE_REG_PERF_UNREGISTER,
+#endif
 };
 
 struct ftrace_event_call;
Signature · 1 line
1.7.1