All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Skeggs <bskeggs@redhat.com>
To: Jingoo Han <jg1.han@samsung.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/nouveau/hwmon: replace strict_strtol() with kstrtol()
Date: Fri, 7 Feb 2014 00:36:38 -0500 (EST)	[thread overview]
Message-ID: <1302089590.26189448.1391751398477.JavaMail.root@redhat.com> (raw)
In-Reply-To: <000401cf2216$64ba9c90$2e2fd5b0$%han@samsung.com>

----- Original Message -----
> From: "Jingoo Han" <jg1.han@samsung.com>
> To: "Ben Skeggs" <bskeggs@redhat.com>
> Cc: dri-devel@lists.freedesktop.org, "David Airlie" <airlied@linux.ie>, "Jingoo Han" <jg1.han@samsung.com>
> Sent: Wednesday, 5 February, 2014 12:02:59 PM
> Subject: [PATCH] drm/nouveau/hwmon: replace strict_strtol() with kstrtol()
> 
> The usage of strict_strtol() is not preferred, because
> strict_strtol() is obsolete. Thus, kstrtol() should be
> used.
> 
Picked it up.  Thanks!

> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/gpu/drm/nouveau/nouveau_hwmon.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> index 4aff04f..34ad3fa 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
> @@ -383,8 +383,9 @@ nouveau_hwmon_set_pwm1_enable(struct device *d, struct
> device_attribute *a,
>  	long value;
>  	int ret;
>  
> -	if (strict_strtol(buf, 10, &value) == -EINVAL)
> -		return -EINVAL;
> +	ret = kstrtol(buf, 10, &value);
> +	if (ret)
> +		return ret;
>  
>  	ret = therm->attr_set(therm, NOUVEAU_THERM_ATTR_FAN_MODE, value);
>  	if (ret)
> --
> 1.7.10.4
> 
> 
> 

      reply	other threads:[~2014-02-07  5:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05  2:02 [PATCH] drm/nouveau/hwmon: replace strict_strtol() with kstrtol() Jingoo Han
2014-02-07  5:36 ` Ben Skeggs [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1302089590.26189448.1391751398477.JavaMail.root@redhat.com \
    --to=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jg1.han@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.