[PATCH 1/4] mm: remove obsolete simple_strtoul

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch replace the obsolete simple_strtoul with kstrtoul API.

Signed-off-by: Abhijit Pawar <abhi.c.pawar@xxxxxxxxx>
---
 mm/kmemleak.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index a217cc5..b141532 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1555,8 +1555,11 @@ static int dump_str_object_info(const char *str)
 	unsigned long flags;
 	struct kmemleak_object *object;
 	unsigned long addr;
+	int rc;
 
-	addr= simple_strtoul(str, NULL, 0);
+	rc = kstrtoul(str, 0, &addr);
+	if (rc)
+		return -EINVAL;
 	object = find_and_get_object(addr, 0);
 	if (!object) {
 		pr_info("Unknown object at 0x%08lx\n", addr);
-- 
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]