From patchwork Sat Jun 1 07:25:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2647281 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 5B5563FDBC for ; Sat, 1 Jun 2013 07:25:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753284Ab3FAHZ2 (ORCPT ); Sat, 1 Jun 2013 03:25:28 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:56123 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839Ab3FAHZ1 (ORCPT ); Sat, 1 Jun 2013 03:25:27 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MNP006ORDYEOXE0@mailout2.samsung.com> for linux-pci@vger.kernel.org; Sat, 01 Jun 2013 16:25:26 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.48]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 59.FC.29708.6E1A9A15; Sat, 01 Jun 2013 16:25:26 +0900 (KST) X-AuditID: cbfee690-b7f6f6d00000740c-c6-51a9a1e68ece Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 2C.5A.28381.5E1A9A15; Sat, 01 Jun 2013 16:25:26 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MNP0054ADYD7C90@mmp2.samsung.com>; Sat, 01 Jun 2013 16:25:25 +0900 (KST) From: Jingoo Han To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Jingoo Han Subject: [PATCH] PCI: sysfs: replace strict_strtoul() with kstrtoul() Date: Sat, 01 Jun 2013 16:25:25 +0900 Message-id: <001001ce5e99$2f6c7f90$8e457eb0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac5emQfpu/WTtzEzTCmrlrNeNr2HCA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsVy+t8zA91nC1cGGvw/x2KxpCnD4vLCS6wW Z+cdZ3Ng9liwqdSjb8sqRo/Pm+QCmKO4bFJSczLLUov07RK4Mo48/shesFS84vT8SWwNjLuF uhg5OSQETCR6TnxlgrDFJC7cW8/WxcjFISSwjFHiTeMCNpiiZ1vPsIDYQgLTGSV6P5lDFP1i lPg4ZzErSIJNQE3iy5fD7CC2iIC6xMKj78GmMgvYS6w9+Q1skLCAq8Sp7f/B4iwCqhIPZvaB 2bwClhLHWz+wQNiCEj8m32OB6NWSWL/zONQceYnNa94yQxykILHj7GtGiF16Ep9aLkPViEjs e/GOEeQ4CYF57BJNK++yQCwTkPg2+RCQzQGUkJXYdABqjqTEwRU3WCYwis1CsnoWktWzkKye hWTFAkaWVYyiqQXJBcVJ6UUmesWJucWleel6yfm5mxgh8TRhB+O9A9aHGJOB1k9klhJNzgfG Y15JvKGxmZGFqYmpsZG5pRlpwkrivOot1oFCAumJJanZqakFqUXxRaU5qcWHGJk4OKUaGDWd 5Z+tXbPJ5HesxGe3NRlsnN9u9syt+pxS2Tw3Yo0ij1lIwr+pjjcU8o0Sv/DedkqL1jsgMtuK 46fC58h+56Mdm47PyZwllvX33nMv38mZGsF3j3tGdE8uncpiZbQl153PdeKTU3O7tAJjo1pa ThXfXn5w0e0stYmpCtcPr7lWGMTX+3XHKiWW4oxEQy3mouJEADRD/j69AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjleLIzCtJLcpLzFFi42I5/e+xoO6zhSsDDfZGWyxpyrC4vPASq8XZ ecfZHJg9Fmwq9ejbsorR4/MmuQDmqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNL C3MlhbzE3FRbJRefAF23zBygNUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBA wjrGjCOPP7IXLBWvOD1/ElsD426hLkZODgkBE4lnW8+wQNhiEhfurWcDsYUEpjNK9H4y72Lk ArJ/MUp8nLOYFSTBJqAm8eXLYXYQW0RAXWLh0fdMIDazgL3E2pPfwJqFBVwlTm3/DxZnEVCV eDCzD8zmFbCUON76gQXCFpT4MfkeC0SvlsT6nceh5shLbF7zlhniIAWJHWdfM0Ls0pP41HIZ qkZEYt+Ld4wTGAVmIRk1C8moWUhGzULSsoCRZRWjaGpBckFxUnquoV5xYm5xaV66XnJ+7iZG cKw+k9rBuLLB4hCjAAejEg+vwYoVgUKsiWXFlbmHGCU4mJVEeFcuWBkoxJuSWFmVWpQfX1Sa k1p8iDEZ6NOJzFKiyfnANJJXEm9obGJmZGlkZmFkYm5OmrCSOO+BVutAIYH0xJLU7NTUgtQi mC1MHJxSDYzHnwmf+vjzu4KO/cm1TqGzfF65srLN7GWs7VuRdmamP2dJkvWbE/2FO1IvWm62 MNhxy2SF0SOJtIj15wyn1iwobDOd9Ss1fP77eXeOe7Ft2ZpVab7+R4ZfkdGz+rvpakv4z//j 0fytr3Nwi23h39LPn5PNP7ozspYpibL2GT/0naywJu1AVY8SS3FGoqEWc1FxIgC1HBKJGQMA AA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han --- drivers/pci/pci-sysfs.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 5b4a9d9..0b56e08 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -66,7 +66,7 @@ static ssize_t broken_parity_status_store(struct device *dev, struct pci_dev *pdev = to_pci_dev(dev); unsigned long val; - if (strict_strtoul(buf, 0, &val) < 0) + if (kstrtoul(buf, 0, &val) < 0) return -EINVAL; pdev->broken_parity_status = !!val; @@ -188,7 +188,7 @@ static ssize_t is_enabled_store(struct device *dev, { struct pci_dev *pdev = to_pci_dev(dev); unsigned long val; - ssize_t result = strict_strtoul(buf, 0, &val); + ssize_t result = kstrtoul(buf, 0, &val); if (result < 0) return result; @@ -259,7 +259,7 @@ msi_bus_store(struct device *dev, struct device_attribute *attr, struct pci_dev *pdev = to_pci_dev(dev); unsigned long val; - if (strict_strtoul(buf, 0, &val) < 0) + if (kstrtoul(buf, 0, &val) < 0) return -EINVAL; /* bad things may happen if the no_msi flag is changed @@ -291,7 +291,7 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf, unsigned long val; struct pci_bus *b = NULL; - if (strict_strtoul(buf, 0, &val) < 0) + if (kstrtoul(buf, 0, &val) < 0) return -EINVAL; if (val) { @@ -315,7 +315,7 @@ dev_rescan_store(struct device *dev, struct device_attribute *attr, unsigned long val; struct pci_dev *pdev = to_pci_dev(dev); - if (strict_strtoul(buf, 0, &val) < 0) + if (kstrtoul(buf, 0, &val) < 0) return -EINVAL; if (val) { @@ -342,7 +342,7 @@ remove_store(struct device *dev, struct device_attribute *dummy, int ret = 0; unsigned long val; - if (strict_strtoul(buf, 0, &val) < 0) + if (kstrtoul(buf, 0, &val) < 0) return -EINVAL; /* An attribute cannot be unregistered by one of its own methods, @@ -362,7 +362,7 @@ dev_bus_rescan_store(struct device *dev, struct device_attribute *attr, unsigned long val; struct pci_bus *bus = to_pci_bus(dev); - if (strict_strtoul(buf, 0, &val) < 0) + if (kstrtoul(buf, 0, &val) < 0) return -EINVAL; if (val) { @@ -384,7 +384,7 @@ static ssize_t d3cold_allowed_store(struct device *dev, struct pci_dev *pdev = to_pci_dev(dev); unsigned long val; - if (strict_strtoul(buf, 0, &val) < 0) + if (kstrtoul(buf, 0, &val) < 0) return -EINVAL; pdev->d3cold_allowed = !!val; @@ -1236,7 +1236,7 @@ static ssize_t reset_store(struct device *dev, { struct pci_dev *pdev = to_pci_dev(dev); unsigned long val; - ssize_t result = strict_strtoul(buf, 0, &val); + ssize_t result = kstrtoul(buf, 0, &val); if (result < 0) return result;