]> Git Repo - linux.git/commitdiff
dynamic_debug: replace obselete simple_strtoul() with kstrtouint()
authorAndrey Ryabinin <[email protected]>
Tue, 28 Jan 2014 01:06:59 +0000 (17:06 -0800)
committerLinus Torvalds <[email protected]>
Tue, 28 Jan 2014 05:02:39 +0000 (21:02 -0800)
Signed-off-by: Andrey Ryabinin <[email protected]>
Cc: Jason Baron <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
lib/dynamic_debug.c

index e488d9a03adcdac5720f6bfb9a75d714b628b0ea..7288e38e17575952664af1df3a69ba488812c8e3 100644 (file)
@@ -268,14 +268,12 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords)
  */
 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;
        }
This page took 0.058776 seconds and 4 git commands to generate.