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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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'))
+1 −0
Original line number Diff line number Diff line
@@ -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') {
+1 −0
Original line number Diff line number Diff line
@@ -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++;