From: Dan Carpenter <error27@gmail.com>
To: Jason Baron <jbaron@redhat.com>
Cc: "Greg Kroah-Hartman" <gregkh@suse.de>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Greg Banks" <gnb@melbourne.sgi.com>,
"André Goddard Rosa" <andre.goddard@gmail.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] dynamic_debug: small clean up in ddebug_proc_write()
Date: Sat, 06 Mar 2010 10:59:34 +0000 [thread overview]
Message-ID: <20100306105934.GA4958@bicker> (raw)
This the doesn't change behavior at all. In the original code, if nwords
was zero then ddebug_parse_query() would return -EINVAL, now we just do
it earlier.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index f935029..4482f9d 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -455,7 +455,7 @@ static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
__func__, (int)len);
nwords = ddebug_tokenize(tmpbuf, words, MAXWORDS);
- if (nwords < 0)
+ if (nwords <= 0)
return -EINVAL;
if (ddebug_parse_query(words, nwords-1, &query))
return -EINVAL;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Jason Baron <jbaron@redhat.com>
Cc: "Greg Kroah-Hartman" <gregkh@suse.de>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Greg Banks" <gnb@melbourne.sgi.com>,
"André Goddard Rosa" <andre.goddard@gmail.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] dynamic_debug: small clean up in ddebug_proc_write()
Date: Sat, 6 Mar 2010 13:59:34 +0300 [thread overview]
Message-ID: <20100306105934.GA4958@bicker> (raw)
This the doesn't change behavior at all. In the original code, if nwords
was zero then ddebug_parse_query() would return -EINVAL, now we just do
it earlier.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index f935029..4482f9d 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -455,7 +455,7 @@ static ssize_t ddebug_proc_write(struct file *file, const char __user *ubuf,
__func__, (int)len);
nwords = ddebug_tokenize(tmpbuf, words, MAXWORDS);
- if (nwords < 0)
+ if (nwords <= 0)
return -EINVAL;
if (ddebug_parse_query(words, nwords-1, &query))
return -EINVAL;
next reply other threads:[~2010-03-06 10:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 10:59 Dan Carpenter [this message]
2010-03-06 10:59 ` [patch] dynamic_debug: small clean up in ddebug_proc_write() Dan Carpenter
2010-03-08 15:51 ` Jason Baron
2010-03-08 15:51 ` Jason Baron
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=20100306105934.GA4958@bicker \
--to=error27@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andre.goddard@gmail.com \
--cc=gnb@melbourne.sgi.com \
--cc=gregkh@suse.de \
--cc=jbaron@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 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.