[<prev] [next>] [day] [month] [year] [list]
Message-ID: <492F9EF0.5010804@cn.fujitsu.com>
Date: Fri, 28 Nov 2008 15:34:08 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Jens Axboe <jens.axboe@...cle.com>
CC: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] block: cleanup for as/deadline/cfq_var_store()
Signed-off-by: Li Zefan <lizf@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists