From: Zhang Zhen Date: Wed, 6 Aug 2014 23:06:06 +0000 (-0700) Subject: mm/mem-hotplug: replace simple_strtoull() with kstrtoull() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b69deb2b7e13f04da5c0684c7ce19e788736ab0d;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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, int i, ret; unsigned long pages_per_block = PAGES_PER_SECTION * sections_per_block; - phys_addr = simple_strtoull(buf, NULL, 0); + ret = kstrtoull(buf, 0, &phys_addr); + if (ret) + return ret; if (phys_addr & ((pages_per_block << PAGE_SHIFT) - 1)) return -EINVAL;