From patchwork Fri Jul 19 07:15:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2830261 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 814C4C0319 for ; Fri, 19 Jul 2013 07:15:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 521FA202CA for ; Fri, 19 Jul 2013 07:15:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E4156202C4 for ; Fri, 19 Jul 2013 07:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759728Ab3GSHPP (ORCPT ); Fri, 19 Jul 2013 03:15:15 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:48018 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759709Ab3GSHPO (ORCPT ); Fri, 19 Jul 2013 03:15:14 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MQ6006W49HDE0K0@mailout2.samsung.com> for linux-rdma@vger.kernel.org; Fri, 19 Jul 2013 16:15:13 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.48]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id 05.60.17404.187E8E15; Fri, 19 Jul 2013 16:15:13 +0900 (KST) X-AuditID: cbfee68d-b7f096d0000043fc-7e-51e8e7815b42 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 93.58.31505.087E8E15; Fri, 19 Jul 2013 16:15:13 +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 <0MQ600D6T9HCVEA0@mmp2.samsung.com>; Fri, 19 Jul 2013 16:15:12 +0900 (KST) From: Jingoo Han To: 'Roland Dreier' Cc: 'Sean Hefty' , 'Hal Rosenstock' , linux-rdma@vger.kernel.org, Jingoo Han Subject: [PATCH] infiniband: replace strict_strtoul() with kstrtoul() Date: Fri, 19 Jul 2013 16:15:12 +0900 Message-id: <001301ce844f$b5e52820$21af7860$@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: Ac6ET4tVhsI1/Gj7QLSWmqbxRej0AA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrEIsWRmVeSWpSXmKPExsVy+t8zA93G5y8CDWbN5LbYuHkio8XlhZdY LZ4d6mWx2NnQwGTRvH4DiwOrx85Zd9k9Fu95yeSxaVUnm0ffllWMHp83yQWwRnHZpKTmZJal FunbJXBldC+ezFhwRLDi2qwF7A2MXXxdjJwcEgImErM3z2WHsMUkLtxbz9bFyMUhJLCMUWLp +g4WmKLrHw4zQSSmM0pcvHacBcL5xSjxbOZFJpAqNgE1iS9fDoONEhFQl+jvucEMUsQsMI1R 4lPnRFaQhLCAq8Txjq1gDSwCqhI9Z/6BNfAKWEoc2HCXEcIWlPgx+R7YamYBLYn1O48zQdjy EpvXvGWGOElBYsfZ14wQy/Qk9vY0MkPUiEjse/GOEWSxhMAhdolpkxawQCwTkPg2+RCQzQGU kJXYdABqjqTEwRU3WCYwis1CsnoWktWzkKyehWTFAkaWVYyiqQXJBcVJ6UWGesWJucWleel6 yfm5mxgh8de7g/H2AetDjMlA6ycyS4km5wPjN68k3tDYzMjC1MTU2Mjc0ow0YS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c9VEtPuf+bx5Tj460NJ/VaVqX/symcnbp6Zd/BZEmTP5dkY4un PmOpqz/nlnqWTYmlOCPRUIu5qDgRAFpI2ioyAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han --- drivers/infiniband/ulp/srpt/ib_srpt.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 653ac6b..9245fe4 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -3678,10 +3678,10 @@ static ssize_t srpt_tpg_attrib_store_srp_max_rdma_size( unsigned long val; int ret; - ret = strict_strtoul(page, 0, &val); + ret = kstrtoul(page, 0, &val); if (ret < 0) { - pr_err("strict_strtoul() failed with ret: %d\n", ret); - return -EINVAL; + pr_err("kstrtoul() failed with ret: %d\n", ret); + return ret; } if (val > MAX_SRPT_RDMA_SIZE) { pr_err("val: %lu exceeds MAX_SRPT_RDMA_SIZE: %d\n", val, @@ -3718,10 +3718,10 @@ static ssize_t srpt_tpg_attrib_store_srp_max_rsp_size( unsigned long val; int ret; - ret = strict_strtoul(page, 0, &val); + ret = kstrtoul(page, 0, &val); if (ret < 0) { - pr_err("strict_strtoul() failed with ret: %d\n", ret); - return -EINVAL; + pr_err("kstrtoul() failed with ret: %d\n", ret); + return ret; } if (val > MAX_SRPT_RSP_SIZE) { pr_err("val: %lu exceeds MAX_SRPT_RSP_SIZE: %d\n", val, @@ -3758,10 +3758,10 @@ static ssize_t srpt_tpg_attrib_store_srp_sq_size( unsigned long val; int ret; - ret = strict_strtoul(page, 0, &val); + ret = kstrtoul(page, 0, &val); if (ret < 0) { - pr_err("strict_strtoul() failed with ret: %d\n", ret); - return -EINVAL; + pr_err("kstrtoul() failed with ret: %d\n", ret); + return ret; } if (val > MAX_SRPT_SRQ_SIZE) { pr_err("val: %lu exceeds MAX_SRPT_SRQ_SIZE: %d\n", val, @@ -3805,10 +3805,10 @@ static ssize_t srpt_tpg_store_enable( unsigned long tmp; int ret; - ret = strict_strtoul(page, 0, &tmp); + ret = kstrtoul(page, 0, &tmp); if (ret < 0) { printk(KERN_ERR "Unable to extract srpt_tpg_store_enable\n"); - return -EINVAL; + return ret; } if ((tmp != 0) && (tmp != 1)) {