Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934955AbaKNBTP (ORCPT ); Thu, 13 Nov 2014 20:19:15 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.228]:53835 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934878AbaKNBOO (ORCPT ); Thu, 13 Nov 2014 20:14:14 -0500 Message-Id: <20141114011411.693008134@goodmis.org> User-Agent: quilt/0.61-1 Date: Thu, 13 Nov 2014 20:12:54 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Ingo Molnar , Andrew Morton , Jiri Kosina , Petr Mladek , Masami Hiramatsu , Namhyung Kim , Srikar Dronamraju Subject: [RFC][PATCH 10/23 v4] tracing/uprobes: Do not use return values of trace_seq_printf() References: <20141114011244.256115061@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=0010-tracing-uprobes-Do-not-use-return-values-of-trace_se.patch X-RR-Connecting-IP: 107.14.168.130:25 X-Cloudmark-Score: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Steven Rostedt (Red Hat)" 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. Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Srikar Dronamraju Signed-off-by: Steven Rostedt --- kernel/trace/trace_uprobe.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index 33ff6a24b802..bd6007b13b52 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c @@ -852,31 +852,26 @@ 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); } for (i = 0; i < tu->tp.nr_args; i++) { struct probe_arg *parg = &tu->tp.args[i]; - if (!parg->type->print(s, parg->name, data + parg->offset, entry)) - goto partial; + parg->type->print(s, parg->name, data + parg->offset, entry); } - if (trace_seq_puts(s, "\n")) - return TRACE_TYPE_HANDLED; + trace_seq_puts(s, "\n"); -partial: - return TRACE_TYPE_PARTIAL_LINE; + return trace_handle_return(s); } typedef bool (*filter_func_t)(struct uprobe_consumer *self, -- 2.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/