tracing/uprobes: Do not use return values of trace_seq_printf()
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Wed, 12 Nov 2014 22:26:57 +0000 (17:26 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 19 Nov 2014 20:25:45 +0000 (15:25 -0500)
The functions trace_seq_printf() and friends will soon no longer have
return values. Using trace_seq_has_overflowed() and trace_handle_return()
should be used instead.

Link: http://lkml.kernel.org/r/20141114011411.693008134@goodmis.org
Link: http://lkml.kernel.org/r/20141115050602.333705855@goodmis.org
Reviewed-by: Masami Hiramatsu <masami.hiramatu.pt@hitachi.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_uprobe.c

index e35327c787f756b6d649f9d7a068951ded0778e8..fd76f8e108ef6518047491c0dde65ed17869afbd 100644 (file)
@@ -852,16 +852,14 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *e
        tu = container_of(event, struct trace_uprobe, tp.call.event);
 
        if (is_ret_probe(tu)) {
-               if (!trace_seq_printf(s, "%s: (0x%lx <- 0x%lx)",
-                                       ftrace_event_name(&tu->tp.call),
-                                       entry->vaddr[1], entry->vaddr[0]))
-                       goto partial;
+               trace_seq_printf(s, "%s: (0x%lx <- 0x%lx)",
+                                ftrace_event_name(&tu->tp.call),
+                                entry->vaddr[1], entry->vaddr[0]);
                data = DATAOF_TRACE_ENTRY(entry, true);
        } else {
-               if (!trace_seq_printf(s, "%s: (0x%lx)",
-                                       ftrace_event_name(&tu->tp.call),
-                                       entry->vaddr[0]))
-                       goto partial;
+               trace_seq_printf(s, "%s: (0x%lx)",
+                                ftrace_event_name(&tu->tp.call),
+                                entry->vaddr[0]);
                data = DATAOF_TRACE_ENTRY(entry, false);
        }
 
@@ -869,14 +867,13 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *e
                struct probe_arg *parg = &tu->tp.args[i];
 
                if (!parg->type->print(s, parg->name, data + parg->offset, entry))
-                       goto partial;
+                       goto out;
        }
 
-       if (trace_seq_putc(s, '\n'))
-               return TRACE_TYPE_HANDLED;
+       trace_seq_putc(s, '\n');
 
-partial:
-       return TRACE_TYPE_PARTIAL_LINE;
+ out:
+       return trace_handle_return(s);
 }
 
 typedef bool (*filter_func_t)(struct uprobe_consumer *self,