Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b69deb2b authored by Zhang Zhen's avatar Zhang Zhen Committed by Linus Torvalds
Browse files

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: default avatarZhang Zhen <zhenzhang.zhang@huawei.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a840cda6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;