diff options
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 8dadbbbd2d5c..8afeea412e77 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -223,10 +223,9 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim, | |||
223 | { | 223 | { |
224 | unsigned long mask; | 224 | unsigned long mask; |
225 | const char *str; | 225 | const char *str; |
226 | const char *ret = p->buffer + p->len; | ||
226 | int i; | 227 | int i; |
227 | 228 | ||
228 | trace_seq_init(p); | ||
229 | |||
230 | for (i = 0; flag_array[i].name && flags; i++) { | 229 | for (i = 0; flag_array[i].name && flags; i++) { |
231 | 230 | ||
232 | mask = flag_array[i].mask; | 231 | mask = flag_array[i].mask; |
@@ -249,7 +248,7 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim, | |||
249 | 248 | ||
250 | trace_seq_putc(p, 0); | 249 | trace_seq_putc(p, 0); |
251 | 250 | ||
252 | return p->buffer; | 251 | return ret; |
253 | } | 252 | } |
254 | EXPORT_SYMBOL(ftrace_print_flags_seq); | 253 | EXPORT_SYMBOL(ftrace_print_flags_seq); |
255 | 254 | ||
@@ -258,8 +257,7 @@ ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val, | |||
258 | const struct trace_print_flags *symbol_array) | 257 | const struct trace_print_flags *symbol_array) |
259 | { | 258 | { |
260 | int i; | 259 | int i; |
261 | 260 | const char *ret = p->buffer + p->len; | |
262 | trace_seq_init(p); | ||
263 | 261 | ||
264 | for (i = 0; symbol_array[i].name; i++) { | 262 | for (i = 0; symbol_array[i].name; i++) { |
265 | 263 | ||
@@ -275,7 +273,7 @@ ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val, | |||
275 | 273 | ||
276 | trace_seq_putc(p, 0); | 274 | trace_seq_putc(p, 0); |
277 | 275 | ||
278 | return p->buffer; | 276 | return ret; |
279 | } | 277 | } |
280 | EXPORT_SYMBOL(ftrace_print_symbols_seq); | 278 | EXPORT_SYMBOL(ftrace_print_symbols_seq); |
281 | 279 | ||