Skip to contentSkip to conversation

tracing: skip printing "OK" if failed to disable event

PATCH In review Yuanhan Liu 1 participant 2 messages Aug 27, 2012 – Sep 14, 2012 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing: skip printing "OK" if failed to disable event

No acutal case found. But logically, we should skip "OK" in case any error met.

---
 kernel/trace/trace_events.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
kernel/trace/trace_events.c +3 -1
index 29111da..9894162 100644
@@ -1646,9 +1646,11 @@ static __init void event_trace_self_tests(void)
 		event_test_stuff();
 
 		ret = __ftrace_set_clr_event(NULL, system->name, NULL, 0);
-		if (WARN_ON_ONCE(ret))
+		if (WARN_ON_ONCE(ret)) {
 			pr_warning("error disabling system %s\n",
 				   system->name);
+			continue;
+		}
 
 		pr_cont("OK\n");
 	}
Signature · 1 line
1.7.7.6
#1 lore raw

[tip:perf/core] tracing: Skip printing "OK" if failed to disable event

Commit-ID:  76bab1b78ab6f25d5f74165f94526c25fc93d984
Gitweb:     http://git.kernel.org/tip/76bab1b78ab6f25d5f74165f94526c25fc93d984
Author:     Yuanhan Liu <[email protected]>
AuthorDate: Mon, 27 Aug 2012 15:13:45 +0800
Committer:  Steven Rostedt <[email protected]>
CommitDate: Thu, 13 Sep 2012 22:52:07 -0400

tracing: Skip printing "OK" if failed to disable event

No acutal case found. But logically, we should skip "OK" in case any error met.

---
 kernel/trace/trace_events.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
kernel/trace/trace_events.c +3 -1
index 6825d83..bbb0e63 100644
@@ -1646,9 +1646,11 @@ static __init void event_trace_self_tests(void)
 		event_test_stuff();
 
 		ret = __ftrace_set_clr_event(NULL, system->name, NULL, 0);
-		if (WARN_ON_ONCE(ret))
+		if (WARN_ON_ONCE(ret)) {
 			pr_warning("error disabling system %s\n",
 				   system->name);
+			continue;
+		}
 
 		pr_cont("OK\n");
 	}