Skip to contentSkip to conversation

+ dynamic_debug-replace-obselete-simple_strtoul-with-kstrtouint.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Jan 24, 2014

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + dynamic_debug-replace-obselete-simple_strtoul-with-kstrtouint.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Fri, 24 Jan 2014 13:49:32 -0800

The patch titled
Subject: dynamic_debug: replace obselete simple_strtoul() with kstrtouint()
has been added to the -mm tree. Its filename is
dynamic_debug-replace-obselete-simple_strtoul-with-kstrtouint.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/dynamic_debug-replace-obselete-simple_strtoul-with-kstrtouint.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/dynamic_debug-replace-obselete-simple_strtoul-with-kstrtouint.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Andrey Ryabinin <[email protected]>
Subject: dynamic_debug: replace obselete simple_strtoul() with kstrtouint()

---

 lib/dynamic_debug.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
lib/dynamic_debug.c renamed from lib/dynamic_debug.c~dynamic_debug-replace-obselete-simple_strtoul-with-kstrtouint +1 -3
diff -puN lib/dynamic_debug.c~dynamic_debug-replace-obselete-simple_strtoul-with-kstrtouint lib/dynamic_debug.c
@@ -268,14 +268,12 @@ static int ddebug_tokenize(char *buf, ch
  */
 static inline int parse_lineno(const char *str, unsigned int *val)
 {
-	char *end = NULL;
 	BUG_ON(str == NULL);
 	if (*str == '\0') {
 		*val = 0;
 		return 0;
 	}
-	*val = simple_strtoul(str, &end, 10);
-	if (end == NULL || end == str || *end != '\0') {
+	if (kstrtouint(str, 10, val) < 0) {
 		pr_err("bad line-number: %s\n", str);
 		return -EINVAL;
 	}

_

Patches currently in -mm which might be from [email protected] are

dynamic_debug-remove-wrong-error-message.patch dynamic_debug-fix-ddebug_parse_query.patch dynamic_debug-replace-obselete-simple_strtoul-with-kstrtouint.patch