All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ftrace: remove redundant test on nsigned
@ 2009-06-22 21:18 Roel Kluin
  2009-06-22 22:20 ` [PATCH] spufs: remove redundant test on unsigned Roel Kluin
  2009-06-23  1:05 ` [PATCH] ftrace: remove redundant test on nsigned Li Zefan
  0 siblings, 2 replies; 4+ messages in thread
From: Roel Kluin @ 2009-06-22 21:18 UTC (permalink / raw)
  To: rostedt; +Cc: LKML, Andrew Morton

Unsigned `cnt' cannot be less than 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Or should it be `if (!cnt || cnt > MAX)' and what should MAX be then?

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index aa08be6..b83f030 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -204,7 +204,7 @@ ftrace_event_write(struct file *file, const char __user *ubuf,
 	char *buf;
 	char ch;
 
-	if (!cnt || cnt < 0)
+	if (!cnt)
 		return 0;
 
 	ret = tracing_update_buffers();

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

end of thread, other threads:[~2009-06-23  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-22 21:18 [PATCH] ftrace: remove redundant test on nsigned Roel Kluin
2009-06-22 22:20 ` [PATCH] spufs: remove redundant test on unsigned Roel Kluin
2009-06-23  9:12   ` Jeremy Kerr
2009-06-23  1:05 ` [PATCH] ftrace: remove redundant test on nsigned Li Zefan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.