mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mm: replace strict_strtoul() with kstrtoul()
The use of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6df46865ff
commit
3dbb95f789
5 changed files with 14 additions and 14 deletions
6
mm/ksm.c
6
mm/ksm.c
|
|
@ -2194,7 +2194,7 @@ static ssize_t sleep_millisecs_store(struct kobject *kobj,
|
|||
unsigned long msecs;
|
||||
int err;
|
||||
|
||||
err = strict_strtoul(buf, 10, &msecs);
|
||||
err = kstrtoul(buf, 10, &msecs);
|
||||
if (err || msecs > UINT_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
@ -2217,7 +2217,7 @@ static ssize_t pages_to_scan_store(struct kobject *kobj,
|
|||
int err;
|
||||
unsigned long nr_pages;
|
||||
|
||||
err = strict_strtoul(buf, 10, &nr_pages);
|
||||
err = kstrtoul(buf, 10, &nr_pages);
|
||||
if (err || nr_pages > UINT_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
@ -2239,7 +2239,7 @@ static ssize_t run_store(struct kobject *kobj, struct kobj_attribute *attr,
|
|||
int err;
|
||||
unsigned long flags;
|
||||
|
||||
err = strict_strtoul(buf, 10, &flags);
|
||||
err = kstrtoul(buf, 10, &flags);
|
||||
if (err || flags > UINT_MAX)
|
||||
return -EINVAL;
|
||||
if (flags > KSM_RUN_UNMERGE)
|
||||
|
|
|
|||
Loading…
Reference in a new issue