mm: replace strict_strtoul() with kstrtoul()
Subsystems (6)
PATCH 1/1 mm: replace strict_strtoul() with kstrtoul()
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used.
Signed-off-by Jingoo Han <[email protected]>
--- mm/huge_memory.c | 8 ++++---- mm/hugetlb.c | 4 ++-- mm/kmemleak.c | 2 +- mm/ksm.c | 6 +++--- mm/slub.c | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-)
mm/huge_memory.c +4 -4
@@ -422,7 +422,7 @@ static ssize_t scan_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 ;
@@ -449,7 +449,7 @@ static ssize_t alloc_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 ;
@@ -475,7 +475,7 @@ static ssize_t pages_to_scan_store(struct kobject *kobj,int err;unsigned long pages; - err =strict_strtoul (buf,10 , &pages); + err =kstrtoul (buf,10 , &pages);if (err || !pages || pages >UINT_MAX )return -EINVAL ;
@@ -543,7 +543,7 @@ static ssize_t khugepaged_max_ptes_none_store(struct kobject *kobj,int err;unsigned long max_ptes_none; - err =strict_strtoul (buf,10 , &max_ptes_none); + err =kstrtoul (buf,10 , &max_ptes_none);if (err || max_ptes_none >HPAGE_PMD_NR -1 )return -EINVAL ;
mm/hugetlb.c +2 -2
@@ -1526,7 +1526,7 @@ static ssize_t nr_hugepages_store_common(bool obey_mempolicy,struct hstate *h;NODEMASK_ALLOC (nodemask_t, nodes_allowed,GFP_KERNEL | __GFP_NORETRY); - err =strict_strtoul (buf,10 , &count); + err =kstrtoul (buf,10 , &count);if (err) goto out;
@@ -1617,7 +1617,7 @@ static ssize_t nr_overcommit_hugepages_store(struct kobject *kobj,if (h->order >=MAX_ORDER )return -EINVAL ; - err =strict_strtoul (buf,10 , &input); + err =kstrtoul (buf,10 , &input);if (err)return err;
mm/kmemleak.c +1 -1
@@ -1639,7 +1639,7 @@ static ssize_t kmemleak_write(struct file *file, const char __user *user_buf,else if (strncmp (buf,"scan=" ,5 ) ==0 ) {unsigned long secs; - ret =strict_strtoul (buf +5 ,0 , &secs); + ret =kstrtoul (buf +5 ,0 , &secs);if (ret <0 ) goto out;stop_scan_thread ();
mm/ksm.c +3 -3
@@ -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 )
mm/slub.c +4 -4
@@ -4438,7 +4438,7 @@ static ssize_t order_store(struct kmem_cache *s,unsigned long order;int err; - err =strict_strtoul (buf,10 , &order); + err =kstrtoul (buf,10 , &order);if (err)return err;
@@ -4466,7 +4466,7 @@ static ssize_t min_partial_store(struct kmem_cache *s, const char *buf,unsigned long min;int err; - err =strict_strtoul (buf,10 , &min); + err =kstrtoul (buf,10 , &min);if (err)return err;
@@ -4486,7 +4486,7 @@ static ssize_t cpu_partial_store(struct kmem_cache *s, const char *buf,unsigned long objects;int err; - err =strict_strtoul (buf,10 , &objects); + err =kstrtoul (buf,10 , &objects);if (err)return err;if (objects && !kmem_cache_has_cpu_partial (s))
@@ -4802,7 +4802,7 @@ static ssize_t remote_node_defrag_ratio_store(struct kmem_cache *s,unsigned long ratio;int err; - err =strict_strtoul (buf,10 , &ratio); + err =kstrtoul (buf,10 , &ratio);if (err)return err;
Signature · 8 lines
1.7.10.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>