mm/mem-hotplug: replace simple_strtoull() with kstrtoull()
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/1 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 <[email protected]>
--- drivers/base/memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/base/memory.c +3 -1
@@ -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 ;
Signature · 13 lines
1.8.1.2 . -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Zhang Zhen
use the newer and more pleasant
kstrtoull()to replacesimple_strtoull(), becausesimple_strtoull()is marked for obsoletion.Signed-off-by Zhang Zhen <[email protected]>
Acked-by David Rientjes <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>