Commit d2b0191a authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

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.orgReviewed-by: default avatarPetr Mladek <pmladek@suse.cz>
Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent a72e10af
...@@ -40,7 +40,8 @@ const char *reserved_field_names[] = { ...@@ -40,7 +40,8 @@ const char *reserved_field_names[] = {
int PRINT_TYPE_FUNC_NAME(type)(struct trace_seq *s, const char *name, \ int PRINT_TYPE_FUNC_NAME(type)(struct trace_seq *s, const char *name, \
void *data, void *ent) \ void *data, void *ent) \
{ \ { \
return trace_seq_printf(s, " %s=" fmt, name, *(type *)data); \ trace_seq_printf(s, " %s=" fmt, name, *(type *)data); \
return !trace_seq_has_overflowed(s); \
} \ } \
const char PRINT_TYPE_FMT_NAME(type)[] = fmt; \ const char PRINT_TYPE_FMT_NAME(type)[] = fmt; \
NOKPROBE_SYMBOL(PRINT_TYPE_FUNC_NAME(type)); NOKPROBE_SYMBOL(PRINT_TYPE_FUNC_NAME(type));
...@@ -61,10 +62,11 @@ int PRINT_TYPE_FUNC_NAME(string)(struct trace_seq *s, const char *name, ...@@ -61,10 +62,11 @@ int PRINT_TYPE_FUNC_NAME(string)(struct trace_seq *s, const char *name,
int len = *(u32 *)data >> 16; int len = *(u32 *)data >> 16;
if (!len) if (!len)
return trace_seq_printf(s, " %s=(fault)", name); trace_seq_printf(s, " %s=(fault)", name);
else else
return trace_seq_printf(s, " %s=\"%s\"", name, trace_seq_printf(s, " %s=\"%s\"", name,
(const char *)get_loc_data(data, ent)); (const char *)get_loc_data(data, ent));
return !trace_seq_has_overflowed(s);
} }
NOKPROBE_SYMBOL(PRINT_TYPE_FUNC_NAME(string)); NOKPROBE_SYMBOL(PRINT_TYPE_FUNC_NAME(string));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment