public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ftrace: clear bits properly in reset_iter_read()
@ 2012-06-09 16:10 Dan Carpenter
  2012-06-09 16:57 ` Steven Rostedt
  2012-12-09 11:30 ` [tip:perf/urgent] ftrace: Clear bits properly in reset_iter_read( ) tip-bot for Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-06-09 16:10 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Frederic Weisbecker, Ingo Molnar, linux-kernel, kernel-janitors

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@oracle.com>
---
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)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-09 11:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-09 16:10 [patch] ftrace: clear bits properly in reset_iter_read() Dan Carpenter
2012-06-09 16:57 ` Steven Rostedt
2012-11-15 21:05   ` Steven Rostedt
2012-12-09 11:30 ` [tip:perf/urgent] ftrace: Clear bits properly in reset_iter_read( ) tip-bot for Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox