From: Vladimir Murzin <vladimir.murzin@arm.com>
To: linux-mm@kvack.org
Cc: akpm@linux-foundation.org, leon@leon.nu
Subject: [PATCH v2 1/3] memtest: use kstrtouint instead of simple_strtoul
Date: Tue, 14 Jul 2015 09:40:47 +0100 [thread overview]
Message-ID: <1436863249-1219-2-git-send-email-vladimir.murzin@arm.com> (raw)
In-Reply-To: <1436863249-1219-1-git-send-email-vladimir.murzin@arm.com>
Since simple_strtoul is obsolete and memtest_pattern is type of int, use
kstrtouint instead.
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
mm/memtest.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/mm/memtest.c b/mm/memtest.c
index 0a1cc13..20e8361 100644
--- a/mm/memtest.c
+++ b/mm/memtest.c
@@ -89,16 +89,18 @@ static void __init do_one_pass(u64 pattern, phys_addr_t start, phys_addr_t end)
}
/* default is disabled */
-static int memtest_pattern __initdata;
+static unsigned int memtest_pattern __initdata;
static int __init parse_memtest(char *arg)
{
+ int ret = 0;
+
if (arg)
- memtest_pattern = simple_strtoul(arg, NULL, 0);
+ ret = kstrtouint(arg, 0, &memtest_pattern);
else
memtest_pattern = ARRAY_SIZE(patterns);
- return 0;
+ return ret;
}
early_param("memtest", parse_memtest);
--
1.7.9.5
--
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>
next prev parent reply other threads:[~2015-07-14 8:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 8:40 [PATCH v2 0/3] memtest cleanups Vladimir Murzin
2015-07-14 8:40 ` Vladimir Murzin [this message]
2015-07-15 23:55 ` [PATCH v2 1/3] memtest: use kstrtouint instead of simple_strtoul David Rientjes
2015-07-14 8:40 ` [PATCH v2 2/3] memtest: cleanup log messages Vladimir Murzin
2015-07-15 23:56 ` David Rientjes
2015-07-16 10:19 ` Vladimir Murzin
2015-07-14 8:40 ` [PATCH v2 3/3] memtest: remove unused header files Vladimir Murzin
2015-07-16 0:09 ` David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436863249-1219-2-git-send-email-vladimir.murzin@arm.com \
--to=vladimir.murzin@arm.com \
--cc=akpm@linux-foundation.org \
--cc=leon@leon.nu \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox