Hi Helen Em 24-04-2018 21:03, Helen Fornazier escreveu: > Hi Gabriel, > >> [PATCH] staging: speakup: remove simple_strtoul() > > You don't need to resend it, but next time add a v3 in the title of the patch > [PATCH v3] staging: speakup: remove simple_strtoul() Hum, ok, sorry! Thank you for advice! > > If you are using git send-email or git format-patch, you can use the > option --subject-prefix="PATCH v2" > > > > On Tue, Apr 24, 2018 at 8:55 PM, Gabriel Fedel <fedel@xxxxxxxxxxxx> wrote: >> Replace simple_strtoul() with kstrtoul(), because simple_strtoul() is >> obsolete >> >> Signed-off-by: Gabriel Fedel <fedel@xxxxxxxxxxxx> >> --- >> drivers/staging/speakup/kobjects.c | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c >> index f1f9022..ddc5ac3 100644 >> --- a/drivers/staging/speakup/kobjects.c >> +++ b/drivers/staging/speakup/kobjects.c >> @@ -154,7 +154,9 @@ static ssize_t chars_chartab_store(struct kobject *kobj, >> continue; >> } >> >> - index = simple_strtoul(cp, &temp, 10); >> + if kstrtoul((char *)cp, 10, &index) != 0 >> + pr_warn("overflow or parsing error has occurred"); >> + >> if (index > 255) { >> rejected++; >> cp = linefeed + 1; >> @@ -787,7 +789,8 @@ static ssize_t message_store_helper(const char *buf, size_t count, >> continue; >> } >> >> - index = simple_strtoul(cp, &temp, 10); >> + if kstrtoul((char *)cp, 10, &index) != 0 >> + pr_warn("overflow or parsing error has occurred"); >> >> while ((temp < linefeed) && (*temp == ' ' || *temp == '\t')) >> temp++; >> -- >> 2.1.4 >> >> >> _______________________________________________ >> Lkcamp mailing list >> Lkcamp@xxxxxxxxxxxxxxxxxxxxxxx >> https://lists.libreplanetbr.org/mailman/listinfo/lkcamp > > > _______________________________________________ Speakup mailing list Speakup@xxxxxxxxxxxxxxxxx http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup