diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2010-05-24 04:24:28 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-06-28 17:12:52 -0400 |
commit | c9d932cf8a1c608b676021aef0189376ba6ef151 (patch) | |
tree | b12777124aad80e266c937dbad33be7706aafe7f /kernel/trace/trace_events.c | |
parent | 210f766915207636acccba7bec42248bfe882998 (diff) |
tracing: Remove test of NULL define_fields callback
Every event (or event class) has it's define_fields callback,
so the test is redundant.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4BFA37BC.8080707@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index d3b4bdf00b39..5bad9cbbf974 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -987,23 +987,21 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, | |||
987 | id); | 987 | id); |
988 | #endif | 988 | #endif |
989 | 989 | ||
990 | if (call->class->define_fields) { | 990 | /* |
991 | /* | 991 | * Other events may have the same class. Only update |
992 | * Other events may have the same class. Only update | 992 | * the fields if they are not already defined. |
993 | * the fields if they are not already defined. | 993 | */ |
994 | */ | 994 | head = trace_get_fields(call); |
995 | head = trace_get_fields(call); | 995 | if (list_empty(head)) { |
996 | if (list_empty(head)) { | 996 | ret = call->class->define_fields(call); |
997 | ret = call->class->define_fields(call); | 997 | if (ret < 0) { |
998 | if (ret < 0) { | 998 | pr_warning("Could not initialize trace point" |
999 | pr_warning("Could not initialize trace point" | 999 | " events/%s\n", call->name); |
1000 | " events/%s\n", call->name); | 1000 | return ret; |
1001 | return ret; | ||
1002 | } | ||
1003 | } | 1001 | } |
1004 | trace_create_file("filter", 0644, call->dir, call, | ||
1005 | filter); | ||
1006 | } | 1002 | } |
1003 | trace_create_file("filter", 0644, call->dir, call, | ||
1004 | filter); | ||
1007 | 1005 | ||
1008 | trace_create_file("format", 0444, call->dir, call, | 1006 | trace_create_file("format", 0444, call->dir, call, |
1009 | format); | 1007 | format); |