* [PATCH] drm/nouveau/hwmon: replace strict_strtol() with kstrtol()
@ 2014-02-05 2:02 Jingoo Han
2014-02-07 5:36 ` Ben Skeggs
0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2014-02-05 2:02 UTC (permalink / raw)
To: 'Ben Skeggs'; +Cc: 'Jingoo Han', dri-devel
The usage of strict_strtol() is not preferred, because
strict_strtol() is obsolete. Thus, kstrtol() should be
used.
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/nouveau/hwmon: replace strict_strtol() with kstrtol()
2014-02-05 2:02 [PATCH] drm/nouveau/hwmon: replace strict_strtol() with kstrtol() Jingoo Han
@ 2014-02-07 5:36 ` Ben Skeggs
0 siblings, 0 replies; 2+ messages in thread
From: Ben Skeggs @ 2014-02-07 5:36 UTC (permalink / raw)
To: Jingoo Han; +Cc: dri-devel
----- 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
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-07 5:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05 2:02 [PATCH] drm/nouveau/hwmon: replace strict_strtol() with kstrtol() Jingoo Han
2014-02-07 5:36 ` Ben Skeggs
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.