Skip to content

Commit 34da5e6

Browse files
Jingoo Hangregkh
authored andcommitted
driver core: replace strict_strto*() with kstrto*()
The usage of strict_strto*() is not preferred, because strict_strto*() is obsolete. Thus, kstrto*() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 86df268 commit 34da5e6

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎drivers/base/core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ long sysfs_deprecated = 0;
3838
#endif
3939
static __init int sysfs_deprecated_setup(char *arg)
4040
{
41-
return strict_strtol(arg, 10, &sysfs_deprecated);
41+
return kstrtol(arg, 10, &sysfs_deprecated);
4242
}
4343
early_param("sysfs.deprecated", sysfs_deprecated_setup);
4444
#endif

‎drivers/base/memory.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ store_soft_offline_page(struct device *dev,
469469
u64 pfn;
470470
if (!capable(CAP_SYS_ADMIN))
471471
return -EPERM;
472-
if (strict_strtoull(buf, 0, &pfn) < 0)
472+
if (kstrtoull(buf, 0, &pfn) < 0)
473473
return -EINVAL;
474474
pfn >>= PAGE_SHIFT;
475475
if (!pfn_valid(pfn))
@@ -488,7 +488,7 @@ store_hard_offline_page(struct device *dev,
488488
u64 pfn;
489489
if (!capable(CAP_SYS_ADMIN))
490490
return -EPERM;
491-
if (strict_strtoull(buf, 0, &pfn) < 0)
491+
if (kstrtoull(buf, 0, &pfn) < 0)
492492
return -EINVAL;
493493
pfn >>= PAGE_SHIFT;
494494
ret = memory_failure(pfn, 0, 0);

‎drivers/base/power/sysfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static ssize_t autosuspend_delay_ms_store(struct device *dev,
206206
if (!dev->power.use_autosuspend)
207207
return -EIO;
208208

209-
if (strict_strtol(buf, 10, &delay) != 0 || delay != (int) delay)
209+
if (kstrtol(buf, 10, &delay) != 0 || delay != (int) delay)
210210
return -EINVAL;
211211

212212
device_lock(dev);

‎drivers/base/regmap/regmap-debugfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ static ssize_t regmap_map_write_file(struct file *file,
281281
reg = simple_strtoul(start, &start, 16);
282282
while (*start == ' ')
283283
start++;
284-
if (strict_strtoul(start, 16, &value))
284+
if (kstrtoul(start, 16, &value))
285285
return -EINVAL;
286286

287287
/* Userspace has been fiddling around behind the kernel's back */

0 commit comments

Comments
 (0)