From 512750ef8b06290a55d749239f956f9c21d7daca Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Mon, 10 Jul 2017 15:51:38 -0700 Subject: lib/kstrtox.c: delete end-of-string test Standard "while (*s)" test is unnecessary because NUL won't pass valid-digit test anyway. Save one branch per parsed character. Link: http://lkml.kernel.org/r/20170514193756.GA32563@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- lib/kstrtox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/kstrtox.c b/lib/kstrtox.c index bf85e05ce858..90013f4841c7 100644 --- a/lib/kstrtox.c +++ b/lib/kstrtox.c @@ -51,7 +51,7 @@ unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long res = 0; rv = 0; - while (*s) { + while (1) { unsigned int val; if ('0' <= *s && *s <= '9') -- cgit v1.2.3