tracing: Have branch tracer use trace_handle_return() helper function
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Wed, 12 Nov 2014 18:19:06 +0000 (13:19 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 19 Nov 2014 20:25:41 +0000 (15:25 -0500)
The branch tracer should not be checking the trace_seq_printf() return value
as that will soon be void. There's a new trace_handle_return() helper function
that will return TRACE_TYPE_PARTIAL_LINE if the trace_seq overflowed
and TRACE_TYPE_HANDLED otherwise.

Reviewed-by: Petr Mladek <pmladek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_branch.c

index a3916f68a1c7189ea0ea3625278b2d4a51608c72..7d6e2afde6690924080ec6dfded18e8f53fc0aea 100644 (file)
@@ -151,14 +151,13 @@ static enum print_line_t trace_branch_print(struct trace_iterator *iter,
 
        trace_assign_type(field, iter->ent);
 
-       if (trace_seq_printf(&iter->seq, "[%s] %s:%s:%d\n",
-                            field->correct ? "  ok  " : " MISS ",
-                            field->func,
-                            field->file,
-                            field->line))
-               return TRACE_TYPE_PARTIAL_LINE;
-
-       return TRACE_TYPE_HANDLED;
+       trace_seq_printf(&iter->seq, "[%s] %s:%s:%d\n",
+                        field->correct ? "  ok  " : " MISS ",
+                        field->func,
+                        field->file,
+                        field->line);
+
+       return trace_handle_return(&iter->seq);
 }
 
 static void branch_print_header(struct seq_file *s)