Re: [PATCH 1/1] kernel/power/hibernate.c: convert simple_strtoul to kstrtoul

From: Rafael J. Wysocki
Date: Fri May 09 2014 - 17:39:02 EST


On Friday, May 09, 2014 08:09:03 PM Fabian Frederick wrote:
>
> Inspired-By: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>

Queued up for 3.16, thanks!

> ---
> kernel/power/hibernate.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index f4f2073..66332b6 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -1109,7 +1109,10 @@ static int __init resumewait_setup(char *str)
>
> static int __init resumedelay_setup(char *str)
> {
> - resume_delay = simple_strtoul(str, NULL, 0);
> + int rc = kstrtoul(str, 0, (unsigned long *)&resume_delay);
> +
> + if (rc)
> + return rc;
> return 1;
> }
>
>

--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/