Commit 615cba35 authored by Samuel Thibault's avatar Samuel Thibault Committed by Greg Kroah-Hartman

staging: speakup: Note that simple_strtoul can't simply be replaced by kstrtoul

We often receive patches which erroneously try to use kstrtoul in these
places.
Signed-off-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 97c64322
......@@ -154,6 +154,7 @@ static ssize_t chars_chartab_store(struct kobject *kobj,
continue;
}
/* Do not replace with kstrtoul: here we need temp to be updated */
index = simple_strtoul(cp, &temp, 10);
if (index > 255) {
rejected++;
......@@ -787,6 +788,7 @@ static ssize_t message_store_helper(const char *buf, size_t count,
continue;
}
/* Do not replace with kstrtoul: here we need temp to be updated */
index = simple_strtoul(cp, &temp, 10);
while ((temp < linefeed) && (*temp == ' ' || *temp == '\t'))
......
......@@ -1979,6 +1979,7 @@ static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u_short key)
return 1;
}
/* Do not replace with kstrtoul: here we need cp to be updated */
goto_pos = simple_strtoul(goto_buf, &cp, 10);
if (*cp == 'x') {
......
......@@ -328,6 +328,7 @@ char *spk_s2uchar(char *start, char *dest)
{
int val;
/* Do not replace with kstrtoul: here we need start to be updated */
val = simple_strtoul(skip_spaces(start), &start, 10);
if (*start == ',')
start++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment