From: Roel Kluin <roel.kluin@gmail.com>
To: rostedt@goodmis.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] ftrace: remove redundant test on nsigned
Date: Mon, 22 Jun 2009 23:18:00 +0200 [thread overview]
Message-ID: <4A3FF508.3000304@gmail.com> (raw)
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();
next reply other threads:[~2009-06-22 19:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 21:18 Roel Kluin [this message]
2009-06-23 1:05 ` [PATCH] ftrace: remove redundant test on nsigned Li Zefan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A3FF508.3000304@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox