diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-11-12 17:26:57 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-11-19 15:25:45 -0500 |
commit | 8579a107a6490511bbe35d6f0be5be5b8b697775 (patch) | |
tree | 0e6597b53b44ae813f826ad5620bedee786a5510 /kernel | |
parent | d2b0191a38cb1811fa69f645ff4b37e3a23a956d (diff) |
tracing/uprobes: Do not use return values of trace_seq_printf()
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_uprobe.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index e35327c787f7..fd76f8e108ef 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c | |||
@@ -852,16 +852,14 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *e | |||
852 | tu = container_of(event, struct trace_uprobe, tp.call.event); | 852 | tu = container_of(event, struct trace_uprobe, tp.call.event); |
853 | 853 | ||
854 | if (is_ret_probe(tu)) { | 854 | if (is_ret_probe(tu)) { |
855 | if (!trace_seq_printf(s, "%s: (0x%lx <- 0x%lx)", | 855 | trace_seq_printf(s, "%s: (0x%lx <- 0x%lx)", |
856 | ftrace_event_name(&tu->tp.call), | 856 | ftrace_event_name(&tu->tp.call), |
857 | entry->vaddr[1], entry->vaddr[0])) | 857 | entry->vaddr[1], entry->vaddr[0]); |
858 | goto partial; | ||
859 | data = DATAOF_TRACE_ENTRY(entry, true); | 858 | data = DATAOF_TRACE_ENTRY(entry, true); |
860 | } else { | 859 | } else { |
861 | if (!trace_seq_printf(s, "%s: (0x%lx)", | 860 | trace_seq_printf(s, "%s: (0x%lx)", |
862 | ftrace_event_name(&tu->tp.call), | 861 | ftrace_event_name(&tu->tp.call), |
863 | entry->vaddr[0])) | 862 | entry->vaddr[0]); |
864 | goto partial; | ||
865 | data = DATAOF_TRACE_ENTRY(entry, false); | 863 | data = DATAOF_TRACE_ENTRY(entry, false); |
866 | } | 864 | } |
867 | 865 | ||
@@ -869,14 +867,13 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *e | |||
869 | struct probe_arg *parg = &tu->tp.args[i]; | 867 | struct probe_arg *parg = &tu->tp.args[i]; |
870 | 868 | ||
871 | if (!parg->type->print(s, parg->name, data + parg->offset, entry)) | 869 | if (!parg->type->print(s, parg->name, data + parg->offset, entry)) |
872 | goto partial; | 870 | goto out; |
873 | } | 871 | } |
874 | 872 | ||
875 | if (trace_seq_putc(s, '\n')) | 873 | trace_seq_putc(s, '\n'); |
876 | return TRACE_TYPE_HANDLED; | ||
877 | 874 | ||
878 | partial: | 875 | out: |
879 | return TRACE_TYPE_PARTIAL_LINE; | 876 | return trace_handle_return(s); |
880 | } | 877 | } |
881 | 878 | ||
882 | typedef bool (*filter_func_t)(struct uprobe_consumer *self, | 879 | typedef bool (*filter_func_t)(struct uprobe_consumer *self, |