All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] block: cleanup for as/deadline/cfq_var_store()
Date: Fri, 28 Nov 2008 15:34:08 +0800	[thread overview]
Message-ID: <492F9EF0.5010804@cn.fujitsu.com> (raw)



Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 block/as-iosched.c       |    4 +---
 block/cfq-iosched.c      |    4 +---
 block/deadline-iosched.c |    4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/block/as-iosched.c b/block/as-iosched.c
index 71f0abb..d122076 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -1403,9 +1403,7 @@ as_var_show(unsigned int var, char *page)
 static ssize_t
 as_var_store(unsigned long *var, const char *page, size_t count)
 {
-	char *p = (char *) page;
-
-	*var = simple_strtoul(p, &p, 10);
+	*var = simple_strtoul(page, NULL, 10);
 	return count;
 }
 
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 6a062ee..5185dd1 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2281,9 +2281,7 @@ cfq_var_show(unsigned int var, char *page)
 static ssize_t
 cfq_var_store(unsigned int *var, const char *page, size_t count)
 {
-	char *p = (char *) page;
-
-	*var = simple_strtoul(p, &p, 10);
+	*var = simple_strtoul(page, NULL, 10);
 	return count;
 }
 
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index fd31117..5e24af5 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -380,9 +380,7 @@ deadline_var_show(int var, char *page)
 static ssize_t
 deadline_var_store(int *var, const char *page, size_t count)
 {
-	char *p = (char *) page;
-
-	*var = simple_strtol(p, &p, 10);
+	*var = simple_strtol(page, NULL, 10);
 	return count;
 }
 
-- 
1.5.4.rc3

                 reply	other threads:[~2008-11-28  7:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=492F9EF0.5010804@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=jens.axboe@oracle.com \
    --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.