Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zhang Zhen and committed by
Linus Torvalds
b69deb2b a840cda6

+3 -1
+3 -1
drivers/base/memory.c
··· 406 406 int i, ret; 407 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 413 if (phys_addr & ((pages_per_block << PAGE_SHIFT) - 1)) 412 414 return -EINVAL;