* [PATCH v2] mm/mem-hotplug: replace simple_strtoull() with kstrtoull() [not found] <1403170456-25054-1-git-send-email-zhenzhang.zhang@huawei.com> @ 2014-06-19 9:34 ` Zhang Zhen 2014-06-19 21:36 ` David Rientjes 0 siblings, 1 reply; 2+ messages in thread From: Zhang Zhen @ 2014-06-19 9:34 UTC (permalink / raw) To: nfont, akpm, David Rientjes; +Cc: linux-mm 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> --- drivers/base/memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 89f752d..4fee600 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; -- 1.8.1.2 . -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] mm/mem-hotplug: replace simple_strtoull() with kstrtoull() 2014-06-19 9:34 ` [PATCH v2] mm/mem-hotplug: replace simple_strtoull() with kstrtoull() Zhang Zhen @ 2014-06-19 21:36 ` David Rientjes 0 siblings, 0 replies; 2+ messages in thread From: David Rientjes @ 2014-06-19 21:36 UTC (permalink / raw) To: Zhang Zhen; +Cc: nfont, akpm, linux-mm On Thu, 19 Jun 2014, Zhang Zhen wrote: > 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> -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-19 21:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1403170456-25054-1-git-send-email-zhenzhang.zhang@huawei.com>
2014-06-19 9:34 ` [PATCH v2] mm/mem-hotplug: replace simple_strtoull() with kstrtoull() Zhang Zhen
2014-06-19 21:36 ` David Rientjes
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox