[PATCH] staging: speakup: fix checkpatch warning

Roxana Blaj roxanagabriela10 at gmail.com
Tue Sep 16 02:09:05 EEST 2014


I realized that in my last patch I didn't understand how to use the
function kstrtoul correctly. I will modify.
Thanks!

2014-09-15 19:34 GMT+03:00 Roxana Blaj <roxanagabriela10 at gmail.com>:

> This fixes the checkpatch warning:
> WARNING: simple_strtoul is obsolete, use kstrtoul instead
>
> Signed-off-by: Roxana Blaj <roxanagabriela10 at gmail.com>
> ---
>  drivers/staging/speakup/kobjects.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/speakup/kobjects.c
> b/drivers/staging/speakup/kobjects.c
> index bcc7f62..3f2a960 100644
> --- a/drivers/staging/speakup/kobjects.c
> +++ b/drivers/staging/speakup/kobjects.c
> @@ -153,7 +153,7 @@ static ssize_t chars_chartab_store(struct kobject
> *kobj,
>                         continue;
>                 }
>
> -               index = simple_strtoul(cp, &temp, 10);
> +               index = kstrtoul(cp, 10, temp);
>                 if (index > 255) {
>                         rejected++;
>                         cp = linefeed + 1;
> @@ -782,7 +782,7 @@ static ssize_t message_store_helper(const char *buf,
> size_t count,
>                         continue;
>                 }
>
> -               index = simple_strtoul(cp, &temp, 10);
> +               index = kstrtoul(cp, 10, temp);
>
>                 while ((temp < linefeed) && (*temp == ' ' || *temp ==
> '\t'))
>                         temp++;
> --
> 1.9.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rosedu.org/pipermail/firefly/attachments/20140916/03a6628d/attachment.html>


More information about the firefly mailing list