diff options
author | majianpeng <majianpeng@gmail.com> | 2012-07-27 15:07:59 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2012-07-27 15:07:59 +0100 |
commit | 1a66a08ae82b16eb40705ad112ff28873981af92 (patch) | |
tree | afb3a927ce42b549df8083e66cca23cd865ab80a /drivers/md/dm-stripe.c | |
parent | 70c48611024791ccf83aca6195b58a5db9325485 (diff) |
dm: replace simple_strtoul
Replace obsolete simple_strtoul() with kstrtou8/kstrtouint.
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-stripe.c')
-rw-r--r-- | drivers/md/dm-stripe.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index 35c94ff24ad..183db5d3e48 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c @@ -99,7 +99,6 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) sector_t width; uint32_t stripes; uint32_t chunk_size; - char *end; int r; unsigned int i; @@ -108,14 +107,12 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) return -EINVAL; } - stripes = simple_strtoul(argv[0], &end, 10); - if (!stripes || *end) { + if (kstrtouint(argv[0], 10, &stripes) || !stripes) { ti->error = "Invalid stripe count"; return -EINVAL; } - chunk_size = simple_strtoul(argv[1], &end, 10); - if (*end) { + if (kstrtouint(argv[1], 10, &chunk_size)) { ti->error = "Invalid chunk_size"; return -EINVAL; } |