linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Masami Hiramatsu <masami.hiramatu.pt@hitachi.com>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	Namhyung Kim <namhyung@kernel.org>
Subject: [for-next][PATCH 15/18] tracing/uprobes: Do not use return values of trace_seq_printf()
Date: Wed, 19 Nov 2014 18:26:47 -0500	[thread overview]
Message-ID: <20141119232711.903271065@goodmis.org> (raw)
In-Reply-To: 20141119232632.737569526@goodmis.org

[-- Attachment #1: 0015-tracing-uprobes-Do-not-use-return-values-of-trace_se.patch --]
[-- Type: text/plain, Size: 2182 bytes --]

From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

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 | 23 ++++++++++-------------
 1 file 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
 	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,
-- 
2.1.1



  parent reply	other threads:[~2014-11-19 23:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 23:26 [for-next][PATCH 00/18] tracing: Fixes and trace-seq updates Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 01/18] tracing: Fix race of function probes counting Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 02/18] ftrace/x86: Add frames pointers to trampoline as necessary Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 03/18] ftrace/x86/extable: Add is_ftrace_trampoline() function Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 04/18] x86/kvm/tracing: Use helper function trace_seq_buffer_ptr() Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 05/18] RAS/tracing: Use trace_seq_buffer_ptr() helper instead of open coded Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 06/18] tracing: Fix trace_seq_bitmask() to start at current position Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 07/18] tracing: Add trace_seq_has_overflowed() and trace_handle_return() Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 08/18] blktrace/tracing: Use trace_seq_has_overflowed() helper function Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 09/18] ring-buffer: Remove check of trace_seq_{puts,printf}() return values Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 10/18] tracing: Have branch tracer use trace_handle_return() helper function Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 11/18] tracing: Have function_graph use trace_seq_has_overflowed() Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 12/18] kprobes/tracing: Use trace_seq_has_overflowed() for overflow checks Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 13/18] tracing: Do not check return values of trace_seq_p*() for mmio tracer Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 14/18] tracing/probes: Do not use return value of trace_seq_printf() Steven Rostedt
2014-11-19 23:26 ` Steven Rostedt [this message]
2014-11-19 23:26 ` [for-next][PATCH 16/18] tracing: Do not use return values of trace_seq_printf() in syscall tracing Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 17/18] tracing: Remove return values of most trace_seq_*() functions Steven Rostedt
2014-11-19 23:26 ` [for-next][PATCH 18/18] tracing: Fix return value of ftrace_raw_output_prep() Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141119232711.903271065@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=srikar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).