[patch] ftrace: clear bits properly in reset_iter_read()

From: Dan Carpenter
Date: Sat Jun 09 2012 - 12:10:35 EST


There is a typo here where '&' is used instead of '|' and it turns the
statement into a noop. The original code is equivalent to:

iter->flags &= ~((1 << 2) & (1 << 4));

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
This is a static checker fix and I'm not super familiar with ftrace.
Please review carefully.

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index a008663..97da2dc 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2358,7 +2358,7 @@ static void reset_iter_read(struct ftrace_iterator *iter)
{
iter->pos = 0;
iter->func_pos = 0;
- iter->flags &= ~(FTRACE_ITER_PRINTALL & FTRACE_ITER_HASH);
+ iter->flags &= ~(FTRACE_ITER_PRINTALL | FTRACE_ITER_HASH);
}

static void *t_start(struct seq_file *m, loff_t *pos)
--
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/