mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
dynamic_debug: replace obselete simple_strtoul() with kstrtouint()
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Cc: Jason Baron <jbaron@akamai.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3ace678fd1
commit
4592599af3
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
static inline int parse_lineno(const char *str, unsigned int *val)
|
||||||
{
|
{
|
||||||
char *end = NULL;
|
|
||||||
BUG_ON(str == NULL);
|
BUG_ON(str == NULL);
|
||||||
if (*str == '\0') {
|
if (*str == '\0') {
|
||||||
*val = 0;
|
*val = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
*val = simple_strtoul(str, &end, 10);
|
if (kstrtouint(str, 10, val) < 0) {
|
||||||
if (end == NULL || end == str || *end != '\0') {
|
|
||||||
pr_err("bad line-number: %s\n", str);
|
pr_err("bad line-number: %s\n", str);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue