From patchwork Sun Nov 6 13:26:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 123928 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A83E2B6F6F for ; Mon, 7 Nov 2011 00:28:17 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752742Ab1KFN1z (ORCPT ); Sun, 6 Nov 2011 08:27:55 -0500 Received: from mgw2.diku.dk ([130.225.96.92]:41032 "EHLO mgw2.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850Ab1KFN06 (ORCPT ); Sun, 6 Nov 2011 08:26:58 -0500 Received: from localhost (localhost [127.0.0.1]) by mgw2.diku.dk (Postfix) with ESMTP id 5DE2B19BBE5; Sun, 6 Nov 2011 14:26:57 +0100 (CET) Received: from mgw2.diku.dk ([127.0.0.1]) by localhost (mgw2.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19102-08; Sun, 6 Nov 2011 14:26:50 +0100 (CET) Received: from palace.topps.diku.dk (palace.ekstranet.diku.dk [192.38.115.202]) by mgw2.diku.dk (Postfix) with ESMTP id 7182319BBD1; Sun, 6 Nov 2011 14:26:50 +0100 (CET) From: Julia Lawall To: "J. Bruce Fields" Cc: kernel-janitors@vger.kernel.org, Neil Brown , Trond Myklebust , "David S. Miller" , linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] net/sunrpc: use kstrtoul, etc Date: Sun, 6 Nov 2011 14:26:47 +0100 Message-Id: <1320586010-21931-3-git-send-email-julia@diku.dk> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1320586010-21931-1-git-send-email-julia@diku.dk> References: <1320586010-21931-1-git-send-email-julia@diku.dk> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Julia Lawall Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc. A semantic patch rule for the kstrtoul case is as follows: (http://coccinelle.lip6.fr/) // @@ expression a,b; {int,long} *c; @@ -strict_strtoul +kstrtoul (a,b,c) // Signed-off-by: Julia Lawall --- net/sunrpc/addr.c | 6 +++--- net/sunrpc/auth.c | 2 +- net/sunrpc/xprtsock.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -u -p a/net/sunrpc/addr.c b/net/sunrpc/addr.c --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c @@ -182,7 +182,7 @@ static int rpc_parse_scope_id(const char scope_id = dev->ifindex; dev_put(dev); } else { - if (strict_strtoul(p, 10, &scope_id) == 0) { + if (kstrtoul(p, 10, &scope_id) == 0) { kfree(p); return 0; } @@ -322,7 +322,7 @@ size_t rpc_uaddr2sockaddr(const char *ua c = strrchr(buf, '.'); if (unlikely(c == NULL)) return 0; - if (unlikely(strict_strtoul(c + 1, 10, &portlo) != 0)) + if (unlikely(kstrtoul(c + 1, 10, &portlo) != 0)) return 0; if (unlikely(portlo > 255)) return 0; @@ -331,7 +331,7 @@ size_t rpc_uaddr2sockaddr(const char *ua c = strrchr(buf, '.'); if (unlikely(c == NULL)) return 0; - if (unlikely(strict_strtoul(c + 1, 10, &porthi) != 0)) + if (unlikely(kstrtoul(c + 1, 10, &porthi) != 0)) return 0; if (unlikely(porthi > 255)) return 0; diff -u -p a/net/sunrpc/auth.c b/net/sunrpc/auth.c --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -47,7 +47,7 @@ static int param_set_hashtbl_sz(const ch if (!val) goto out_inval; - ret = strict_strtoul(val, 0, &num); + ret = kstrtoul(val, 0, &num); if (ret == -EINVAL) goto out_inval; nbits = fls(num); diff -u -p a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2925,7 +2925,7 @@ static int param_set_uint_minmax(const c if (!val) return -EINVAL; - ret = strict_strtoul(val, 0, &num); + ret = kstrtoul(val, 0, &num); if (ret == -EINVAL || num < min || num > max) return -EINVAL; *((unsigned int *)kp->arg) = num;