Re: [PATCH] drm/nouveau/hwmon: replace strict_strtol() with kstrtol()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message -----
> From: "Jingoo Han" <jg1.han@xxxxxxxxxxx>
> To: "Ben Skeggs" <bskeggs@xxxxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx, "David Airlie" <airlied@xxxxxxxx>, "Jingoo Han" <jg1.han@xxxxxxxxxxx>
> 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@xxxxxxxxxxx>
> ---
>  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
> 
> 
> 
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux