Commit dac74940 authored by Steven Rostedt's avatar Steven Rostedt Committed by Ingo Molnar

trace: code style clean up

Ingo Molnar suggested using goto logic to keep the indentation
down and to be able to remove the nasty line breaks. This actually
makes the code a bit more readable.
Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 7be42151
...@@ -522,23 +522,24 @@ int register_tracer(struct tracer *type) ...@@ -522,23 +522,24 @@ int register_tracer(struct tracer *type)
tracing_selftest_running = false; tracing_selftest_running = false;
mutex_unlock(&trace_types_lock); mutex_unlock(&trace_types_lock);
if (!ret && default_bootup_tracer) { if (ret || !default_bootup_tracer)
if (!strncmp(default_bootup_tracer, type->name, goto out_unlock;
BOOTUP_TRACER_SIZE)) {
printk(KERN_INFO "Starting tracer '%s'\n", if (strncmp(default_bootup_tracer, type->name, BOOTUP_TRACER_SIZE))
type->name); goto out_unlock;
/* Do we want this tracer to start on bootup? */
tracing_set_tracer(type->name); printk(KERN_INFO "Starting tracer '%s'\n", type->name);
default_bootup_tracer = NULL; /* Do we want this tracer to start on bootup? */
/* disable other selftests, since this will break it. */ tracing_set_tracer(type->name);
tracing_selftest_disabled = 1; default_bootup_tracer = NULL;
/* disable other selftests, since this will break it. */
tracing_selftest_disabled = 1;
#ifdef CONFIG_FTRACE_STARTUP_TEST #ifdef CONFIG_FTRACE_STARTUP_TEST
printk(KERN_INFO "Disabling FTRACE selftests due" printk(KERN_INFO "Disabling FTRACE selftests due to running tracer '%s'\n",
" to running tracer '%s'\n", type->name); type->name);
#endif #endif
}
}
out_unlock:
lock_kernel(); lock_kernel();
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment