From patchwork Wed Feb 5 02:02:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 3592421 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9F9D69F382 for ; Thu, 6 Feb 2014 00:46:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B542C20145 for ; Thu, 6 Feb 2014 00:46:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 149B520142 for ; Thu, 6 Feb 2014 00:46:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DB8FFAD5D; Wed, 5 Feb 2014 16:45:48 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B6CD106E8A for ; Tue, 4 Feb 2014 18:03:01 -0800 (PST) Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N0I0055E30Z4ZD0@mailout3.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 05 Feb 2014 11:02:59 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.51]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 41.D3.10092.3DB91F25; Wed, 05 Feb 2014 11:02:59 +0900 (KST) X-AuditID: cbfee68f-b7f156d00000276c-bf-52f19bd30922 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 7B.4B.29263.3DB91F25; Wed, 05 Feb 2014 11:02:59 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N0I00F1Y30ZR710@mmp1.samsung.com>; Wed, 05 Feb 2014 11:02:59 +0900 (KST) From: Jingoo Han To: 'Ben Skeggs' Subject: [PATCH] drm/nouveau/hwmon: replace strict_strtol() with kstrtol() Date: Wed, 05 Feb 2014 11:02:59 +0900 Message-id: <000401cf2216$64ba9c90$2e2fd5b0$%han@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac8iFmSgaO6sFXXeRbGTH5y8Ug7CzA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRmVeSWpSXmKPExsVy+t8zY93Lsz8GGbS0S1r0njvJZPFyeQej xZWv79ksLi+8xOrA4rH92wNWj/vdx5k83u+7yubRt2UVYwBLFJdNSmpOZllqkb5dAlfGsg// 2AoesVU8//aLuYHxKmsXIyeHhICJxI99pxkhbDGJC/fWs3UxcnEICSxjlJjS9IwNpmjJ7fns EIlFjBK7Lu1ihHB+MUr8vnEYbBSbgJrEly+H2UFsEQFVieb7E8C6mQVyJN7fXwlUw8EhLOAl cfm/IEiYBahk3eEXYCW8ArYSNybdZIKwBSV+TL7HAtGqJbF+53EmCFteYvOat8wgYyQE1CUe /dWF2KQncWbTW6gSEYl9L96BnSYhsIldYtqhPcwQuwQkvk0+xALRKyux6QAzxF+SEgdX3GCZ wCg2C8nmWUg2z0KyeRaSFQsYWVYxiqYWJBcUJ6UXGesVJ+YWl+al6yXn525ihMRZ/w7Guwes DzEmA62fyCwlmpwPjNO8knhDYzMjC1MTU2Mjc0sz0oSVxHnvP0wKEhJITyxJzU5NLUgtii8q zUktPsTIxMEp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bPGSH72Y33yFQ/5jI2tt+uxFKc kWioxVxUnAgA6hN0CiYDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Wed, 05 Feb 2014 16:45:12 -0800 Cc: 'Jingoo Han' , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The usage of strict_strtol() is not preferred, because strict_strtol() is obsolete. Thus, kstrtol() should be used. Signed-off-by: Jingoo Han --- 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)