diff options
author | Zhang Zhen <zhenzhang.zhang@huawei.com> | 2014-08-06 19:06:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-06 21:01:18 -0400 |
commit | b69deb2b7e13f04da5c0684c7ce19e788736ab0d (patch) | |
tree | 6f1d7eb7b7ce3c97c8b92ed31c25734ed9423929 /drivers/base | |
parent | a840cda63e543d41270698525542a82b7a8a18d7 (diff) |
mm/mem-hotplug: replace simple_strtoull() with kstrtoull()
Use the newer and more pleasant kstrtoull() to replace
simple_strtoull(), because simple_strtoull() is marked for obsoletion.
Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/memory.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 7c60ed27e711..a2e13e250bba 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -406,7 +406,9 @@ memory_probe_store(struct device *dev, struct device_attribute *attr, | |||
406 | int i, ret; | 406 | int i, ret; |
407 | unsigned long pages_per_block = PAGES_PER_SECTION * sections_per_block; | 407 | unsigned long pages_per_block = PAGES_PER_SECTION * sections_per_block; |
408 | 408 | ||
409 | phys_addr = simple_strtoull(buf, NULL, 0); | 409 | ret = kstrtoull(buf, 0, &phys_addr); |
410 | if (ret) | ||
411 | return ret; | ||
410 | 412 | ||
411 | if (phys_addr & ((pages_per_block << PAGE_SHIFT) - 1)) | 413 | if (phys_addr & ((pages_per_block << PAGE_SHIFT) - 1)) |
412 | return -EINVAL; | 414 | return -EINVAL; |