aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-02-05 01:13:38 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-05 08:35:47 -0500
commitdac74940289f350c2590bec92737833bad608541 (patch)
tree94ee2c4b8c365b3e53ae735f0e3ac6b8e9df6949 /kernel/trace
parent7be421510b91491d5aa5a29fa1005712039b95af (diff)
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: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 1d4ff568cc4d..3536ef41575d 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -522,23 +522,24 @@ int register_tracer(struct tracer *type)
522 tracing_selftest_running = false; 522 tracing_selftest_running = false;
523 mutex_unlock(&trace_types_lock); 523 mutex_unlock(&trace_types_lock);
524 524
525 if (!ret && default_bootup_tracer) { 525 if (ret || !default_bootup_tracer)
526 if (!strncmp(default_bootup_tracer, type->name, 526 goto out_unlock;
527 BOOTUP_TRACER_SIZE)) { 527
528 printk(KERN_INFO "Starting tracer '%s'\n", 528 if (strncmp(default_bootup_tracer, type->name, BOOTUP_TRACER_SIZE))
529 type->name); 529 goto out_unlock;
530 /* Do we want this tracer to start on bootup? */ 530
531 tracing_set_tracer(type->name); 531 printk(KERN_INFO "Starting tracer '%s'\n", type->name);
532 default_bootup_tracer = NULL; 532 /* Do we want this tracer to start on bootup? */
533 /* disable other selftests, since this will break it. */ 533 tracing_set_tracer(type->name);
534 tracing_selftest_disabled = 1; 534 default_bootup_tracer = NULL;
535 /* disable other selftests, since this will break it. */
536 tracing_selftest_disabled = 1;
535#ifdef CONFIG_FTRACE_STARTUP_TEST 537#ifdef CONFIG_FTRACE_STARTUP_TEST
536 printk(KERN_INFO "Disabling FTRACE selftests due" 538 printk(KERN_INFO "Disabling FTRACE selftests due to running tracer '%s'\n",
537 " to running tracer '%s'\n", type->name); 539 type->name);
538#endif 540#endif
539 }
540 }
541 541
542 out_unlock:
542 lock_kernel(); 543 lock_kernel();
543 return ret; 544 return ret;
544} 545}