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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Do not replace with kstrtoul: here we need temp to be updated */
|
||||||
index = simple_strtoul(cp, &temp, 10);
|
index = simple_strtoul(cp, &temp, 10);
|
||||||
if (index > 255) {
|
if (index > 255) {
|
||||||
rejected++;
|
rejected++;
|
||||||
|
@ -787,6 +788,7 @@ static ssize_t message_store_helper(const char *buf, size_t count,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Do not replace with kstrtoul: here we need temp to be updated */
|
||||||
index = simple_strtoul(cp, &temp, 10);
|
index = simple_strtoul(cp, &temp, 10);
|
||||||
|
|
||||||
while ((temp < linefeed) && (*temp == ' ' || *temp == '\t'))
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Do not replace with kstrtoul: here we need cp to be updated */
|
||||||
goto_pos = simple_strtoul(goto_buf, &cp, 10);
|
goto_pos = simple_strtoul(goto_buf, &cp, 10);
|
||||||
|
|
||||||
if (*cp == 'x') {
|
if (*cp == 'x') {
|
||||||
|
|
|
@ -328,6 +328,7 @@ char *spk_s2uchar(char *start, char *dest)
|
||||||
{
|
{
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
|
/* Do not replace with kstrtoul: here we need start to be updated */
|
||||||
val = simple_strtoul(skip_spaces(start), &start, 10);
|
val = simple_strtoul(skip_spaces(start), &start, 10);
|
||||||
if (*start == ',')
|
if (*start == ',')
|
||||||
start++;
|
start++;
|
||||||
|
|
Loading…
Reference in New Issue