Commit 3dbb95f7895e378514ffefa93cc887fb1bc9df94

Authored by Jingoo Han
Committed by Linus Torvalds
1 parent 6df46865ff

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 <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 5 changed files with 14 additions and 14 deletions Side-by-side Diff

... ... @@ -417,7 +417,7 @@
417 417 unsigned long msecs;
418 418 int err;
419 419  
420   - err = strict_strtoul(buf, 10, &msecs);
  420 + err = kstrtoul(buf, 10, &msecs);
421 421 if (err || msecs > UINT_MAX)
422 422 return -EINVAL;
423 423  
... ... @@ -444,7 +444,7 @@
444 444 unsigned long msecs;
445 445 int err;
446 446  
447   - err = strict_strtoul(buf, 10, &msecs);
  447 + err = kstrtoul(buf, 10, &msecs);
448 448 if (err || msecs > UINT_MAX)
449 449 return -EINVAL;
450 450  
... ... @@ -470,7 +470,7 @@
470 470 int err;
471 471 unsigned long pages;
472 472  
473   - err = strict_strtoul(buf, 10, &pages);
  473 + err = kstrtoul(buf, 10, &pages);
474 474 if (err || !pages || pages > UINT_MAX)
475 475 return -EINVAL;
476 476  
... ... @@ -538,7 +538,7 @@
538 538 int err;
539 539 unsigned long max_ptes_none;
540 540  
541   - err = strict_strtoul(buf, 10, &max_ptes_none);
  541 + err = kstrtoul(buf, 10, &max_ptes_none);
542 542 if (err || max_ptes_none > HPAGE_PMD_NR-1)
543 543 return -EINVAL;
544 544  
... ... @@ -1526,7 +1526,7 @@
1526 1526 struct hstate *h;
1527 1527 NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY);
1528 1528  
1529   - err = strict_strtoul(buf, 10, &count);
  1529 + err = kstrtoul(buf, 10, &count);
1530 1530 if (err)
1531 1531 goto out;
1532 1532  
... ... @@ -1617,7 +1617,7 @@
1617 1617 if (h->order >= MAX_ORDER)
1618 1618 return -EINVAL;
1619 1619  
1620   - err = strict_strtoul(buf, 10, &input);
  1620 + err = kstrtoul(buf, 10, &input);
1621 1621 if (err)
1622 1622 return err;
1623 1623  
... ... @@ -1639,7 +1639,7 @@
1639 1639 else if (strncmp(buf, "scan=", 5) == 0) {
1640 1640 unsigned long secs;
1641 1641  
1642   - ret = strict_strtoul(buf + 5, 0, &secs);
  1642 + ret = kstrtoul(buf + 5, 0, &secs);
1643 1643 if (ret < 0)
1644 1644 goto out;
1645 1645 stop_scan_thread();
... ... @@ -2194,7 +2194,7 @@
2194 2194 unsigned long msecs;
2195 2195 int err;
2196 2196  
2197   - err = strict_strtoul(buf, 10, &msecs);
  2197 + err = kstrtoul(buf, 10, &msecs);
2198 2198 if (err || msecs > UINT_MAX)
2199 2199 return -EINVAL;
2200 2200  
... ... @@ -2217,7 +2217,7 @@
2217 2217 int err;
2218 2218 unsigned long nr_pages;
2219 2219  
2220   - err = strict_strtoul(buf, 10, &nr_pages);
  2220 + err = kstrtoul(buf, 10, &nr_pages);
2221 2221 if (err || nr_pages > UINT_MAX)
2222 2222 return -EINVAL;
2223 2223  
... ... @@ -2239,7 +2239,7 @@
2239 2239 int err;
2240 2240 unsigned long flags;
2241 2241  
2242   - err = strict_strtoul(buf, 10, &flags);
  2242 + err = kstrtoul(buf, 10, &flags);
2243 2243 if (err || flags > UINT_MAX)
2244 2244 return -EINVAL;
2245 2245 if (flags > KSM_RUN_UNMERGE)
... ... @@ -4420,7 +4420,7 @@
4420 4420 unsigned long order;
4421 4421 int err;
4422 4422  
4423   - err = strict_strtoul(buf, 10, &order);
  4423 + err = kstrtoul(buf, 10, &order);
4424 4424 if (err)
4425 4425 return err;
4426 4426  
... ... @@ -4448,7 +4448,7 @@
4448 4448 unsigned long min;
4449 4449 int err;
4450 4450  
4451   - err = strict_strtoul(buf, 10, &min);
  4451 + err = kstrtoul(buf, 10, &min);
4452 4452 if (err)
4453 4453 return err;
4454 4454  
... ... @@ -4468,7 +4468,7 @@
4468 4468 unsigned long objects;
4469 4469 int err;
4470 4470  
4471   - err = strict_strtoul(buf, 10, &objects);
  4471 + err = kstrtoul(buf, 10, &objects);
4472 4472 if (err)
4473 4473 return err;
4474 4474 if (objects && !kmem_cache_has_cpu_partial(s))
... ... @@ -4784,7 +4784,7 @@
4784 4784 unsigned long ratio;
4785 4785 int err;
4786 4786  
4787   - err = strict_strtoul(buf, 10, &ratio);
  4787 + err = kstrtoul(buf, 10, &ratio);
4788 4788 if (err)
4789 4789 return err;
4790 4790