[PATCH 1/2] ftrace: binary and not logical for continue test
From: Steven Rostedt
Date: Wed Sep 03 2008 - 17:48:12 EST
Peter Zijlstra provided me with a nice brown paper bag while letting me know
that I was doing a logical AND and not a binary one, making a condition
true more often than it should be.
Luckily, a false true is handled by the calling function and no harm is
done. But this needs to be fixed regardless.
Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
---
kernel/trace/trace.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-tip.git/kernel/trace/trace.c
===================================================================
--- linux-tip.git.orig/kernel/trace/trace.c 2008-09-03 16:46:28.000000000 -0400
+++ linux-tip.git/kernel/trace/trace.c 2008-09-03 16:46:30.000000000 -0400
@@ -1655,7 +1655,7 @@ print_lat_fmt(struct trace_iterator *ite
case TRACE_PRINT:
seq_print_ip_sym(s, field->print.ip, sym_flags);
trace_seq_printf(s, ": %s", field->print.buf);
- if (field->flags && TRACE_FLAG_CONT)
+ if (field->flags & TRACE_FLAG_CONT)
trace_seq_print_cont(s, iter);
break;
default:
@@ -1768,7 +1768,7 @@ static int print_trace_fmt(struct trace_
case TRACE_PRINT:
seq_print_ip_sym(s, field->print.ip, sym_flags);
trace_seq_printf(s, ": %s", field->print.buf);
- if (field->flags && TRACE_FLAG_CONT)
+ if (field->flags & TRACE_FLAG_CONT)
trace_seq_print_cont(s, iter);
break;
}
@@ -1833,7 +1833,7 @@ static int print_raw_fmt(struct trace_it
case TRACE_PRINT:
trace_seq_printf(s, "# %lx %s",
field->print.ip, field->print.buf);
- if (field->flags && TRACE_FLAG_CONT)
+ if (field->flags & TRACE_FLAG_CONT)
trace_seq_print_cont(s, iter);
break;
}
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/