aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_probe.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-11-12 17:19:51 -0500
committerSteven Rostedt <rostedt@goodmis.org>2014-11-19 15:25:44 -0500
commitd2b0191a38cb1811fa69f645ff4b37e3a23a956d (patch)
tree076d0a3fd62ad5fa1726211a6f3bc0eee5111516 /kernel/trace/trace_probe.c
parenta72e10afab565385d51e5117d7cffe4a667c1b62 (diff)
tracing/probes: Do not use return value of trace_seq_printf()
The functions trace_seq_printf() and friends will soon not have a return value and will only be a void function. Use trace_seq_has_overflowed() instead to know if the trace_seq operations succeeded or not. Link: http://lkml.kernel.org/r/20141114011411.530216306@goodmis.org Reviewed-by: Petr Mladek <pmladek@suse.cz> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_probe.c')
-rw-r--r--kernel/trace/trace_probe.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index d4b9fc22cd27..b983b2fd2ca1 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -40,7 +40,8 @@ const char *reserved_field_names[] = {
40int PRINT_TYPE_FUNC_NAME(type)(struct trace_seq *s, const char *name, \ 40int PRINT_TYPE_FUNC_NAME(type)(struct trace_seq *s, const char *name, \
41 void *data, void *ent) \ 41 void *data, void *ent) \
42{ \ 42{ \
43 return trace_seq_printf(s, " %s=" fmt, name, *(type *)data); \ 43 trace_seq_printf(s, " %s=" fmt, name, *(type *)data); \
44 return !trace_seq_has_overflowed(s); \
44} \ 45} \
45const char PRINT_TYPE_FMT_NAME(type)[] = fmt; \ 46const char PRINT_TYPE_FMT_NAME(type)[] = fmt; \
46NOKPROBE_SYMBOL(PRINT_TYPE_FUNC_NAME(type)); 47NOKPROBE_SYMBOL(PRINT_TYPE_FUNC_NAME(type));
@@ -61,10 +62,11 @@ int PRINT_TYPE_FUNC_NAME(string)(struct trace_seq *s, const char *name,
61 int len = *(u32 *)data >> 16; 62 int len = *(u32 *)data >> 16;
62 63
63 if (!len) 64 if (!len)
64 return trace_seq_printf(s, " %s=(fault)", name); 65 trace_seq_printf(s, " %s=(fault)", name);
65 else 66 else
66 return trace_seq_printf(s, " %s=\"%s\"", name, 67 trace_seq_printf(s, " %s=\"%s\"", name,
67 (const char *)get_loc_data(data, ent)); 68 (const char *)get_loc_data(data, ent));
69 return !trace_seq_has_overflowed(s);
68} 70}
69NOKPROBE_SYMBOL(PRINT_TYPE_FUNC_NAME(string)); 71NOKPROBE_SYMBOL(PRINT_TYPE_FUNC_NAME(string));
70 72