[PATCH] staging: speakup: replace simple_strtoul with kstrtoul

Samuel Thibault samuel.thibault at ens-lyon.org
Tue Aug 7 14:57:33 EDT 2018


Sumit Kumar, le mer. 08 août 2018 00:16:42 +0530, a ecrit:
> simple_strtoul is obsolete, replace with kstrtoul.
> Issue found by checkpatch.

kstrtoul can't replace simple_strtoul, their APIs are really not the
same.

Samuel

> Signed-off-by: Sumit Kumar <sumit686215 at example.com>
> ---
>  drivers/staging/speakup/kobjects.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c
> index 08f11cc..33459c0 100644
> --- a/drivers/staging/speakup/kobjects.c
> +++ b/drivers/staging/speakup/kobjects.c
> @@ -154,7 +154,7 @@ static ssize_t chars_chartab_store(struct kobject *kobj,
>  			continue;
>  		}
>  
> -		index = simple_strtoul(cp, &temp, 10);
> +		index = kstrtoul(cp, &temp, 10);
>  		if (index > 255) {
>  			rejected++;
>  			cp = linefeed + 1;
> -- 
> 2.7.4
> 

-- 
Samuel
Q:	How do you play religious roulette?
A:	You stand around in a circle and blaspheme and see who gets struck by lightning first.


More information about the Speakup mailing list