diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-06-01 03:15:16 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-06-13 18:10:26 -0400 |
commit | b29bebd66dbd492105668ec3515a5ffb0b25e4c1 (patch) | |
tree | 5cbb8054acd42c242ffd34413e293faab54a1d3f /drivers/md/dm-raid.c | |
parent | 90f5f7ad4f38d67626b0c220a0ac390603e0bded (diff) |
md: replace strict_strto*() with kstrto*()
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r-- | drivers/md/dm-raid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 0f5a6fb5978f..21e8e4660c59 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c | |||
@@ -504,7 +504,7 @@ static int parse_raid_params(struct raid_set *rs, char **argv, | |||
504 | * First, parse the in-order required arguments | 504 | * First, parse the in-order required arguments |
505 | * "chunk_size" is the only argument of this type. | 505 | * "chunk_size" is the only argument of this type. |
506 | */ | 506 | */ |
507 | if ((strict_strtoul(argv[0], 10, &value) < 0)) { | 507 | if ((kstrtoul(argv[0], 10, &value) < 0)) { |
508 | rs->ti->error = "Bad chunk size"; | 508 | rs->ti->error = "Bad chunk size"; |
509 | return -EINVAL; | 509 | return -EINVAL; |
510 | } else if (rs->raid_type->level == 1) { | 510 | } else if (rs->raid_type->level == 1) { |
@@ -585,7 +585,7 @@ static int parse_raid_params(struct raid_set *rs, char **argv, | |||
585 | continue; | 585 | continue; |
586 | } | 586 | } |
587 | 587 | ||
588 | if (strict_strtoul(argv[i], 10, &value) < 0) { | 588 | if (kstrtoul(argv[i], 10, &value) < 0) { |
589 | rs->ti->error = "Bad numerical argument given in raid params"; | 589 | rs->ti->error = "Bad numerical argument given in raid params"; |
590 | return -EINVAL; | 590 | return -EINVAL; |
591 | } | 591 | } |
@@ -1181,7 +1181,7 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv) | |||
1181 | argv++; | 1181 | argv++; |
1182 | 1182 | ||
1183 | /* number of RAID parameters */ | 1183 | /* number of RAID parameters */ |
1184 | if (strict_strtoul(argv[0], 10, &num_raid_params) < 0) { | 1184 | if (kstrtoul(argv[0], 10, &num_raid_params) < 0) { |
1185 | ti->error = "Cannot understand number of RAID parameters"; | 1185 | ti->error = "Cannot understand number of RAID parameters"; |
1186 | return -EINVAL; | 1186 | return -EINVAL; |
1187 | } | 1187 | } |
@@ -1194,7 +1194,7 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv) | |||
1194 | return -EINVAL; | 1194 | return -EINVAL; |
1195 | } | 1195 | } |
1196 | 1196 | ||
1197 | if ((strict_strtoul(argv[num_raid_params], 10, &num_raid_devs) < 0) || | 1197 | if ((kstrtoul(argv[num_raid_params], 10, &num_raid_devs) < 0) || |
1198 | (num_raid_devs >= INT_MAX)) { | 1198 | (num_raid_devs >= INT_MAX)) { |
1199 | ti->error = "Cannot understand number of raid devices"; | 1199 | ti->error = "Cannot understand number of raid devices"; |
1200 | return -EINVAL; | 1200 | return -EINVAL; |