mirror of https://gitee.com/openkylin/linux.git
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: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
97c64322b8
commit
615cba3557
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue