From patchwork Wed Jul 4 23:00:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eldad Zack X-Patchwork-Id: 1157561 Return-Path: X-Original-To: patchwork-linux-nfs@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 87EED3FE4F for ; Wed, 4 Jul 2012 23:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756007Ab2GDXBF (ORCPT ); Wed, 4 Jul 2012 19:01:05 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:64060 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756009Ab2GDXAs (ORCPT ); Wed, 4 Jul 2012 19:00:48 -0400 Received: by mail-ee0-f46.google.com with SMTP id t10so3034926eei.19 for ; Wed, 04 Jul 2012 16:00:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Y4LdQZWgAZcOfLI/7Dtl6OlY31rLiSmLozVpuWv8b74=; b=fNBEyFa29B/NFMcXg9ziCv53yy574xKtekZWet2prVi9NxGQ72fhQjDLkTNaodacZs RssLtAxa48oYWh8Dh/mh5TeFBCbAMOM70G2utwSqTk/vrRDy7W6ckQjWefZGeWtJXQLk ohVceOAswFyDq5EYpLV8xQOBriv4XOSYS2SI0TCO5dAmUjbplkJjSECd2uN2lpn/L4u3 jcmAvL8FQX8Za9dehCDmReSy4MsJuHp+Bx0Tpt+ptsEpqiTEVe+7E5jgrLiXWl6aWyWI zlHMOeA9etoMiVyRebpwVvLL70nsBTXlxw95dByvdDhCfNqubXunXRjkZ7wL3Mj0aO30 PNWg== Received: by 10.14.27.204 with SMTP id e52mr5480141eea.53.1341442848239; Wed, 04 Jul 2012 16:00:48 -0700 (PDT) Received: from localhost ([2001:470:8876:e2ee:26d:b89c:84c0:d06b]) by mx.google.com with ESMTPS id a4sm50448295een.14.2012.07.04.16.00.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Jul 2012 16:00:47 -0700 (PDT) From: Eldad Zack To: Trond Myklebust , "J. Bruce Fields" Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Eldad Zack Subject: [PATCH 2/2] sunrpc/cache.h: replace simple_strtoul Date: Thu, 5 Jul 2012 01:00:26 +0200 Message-Id: <1341442827-21339-2-git-send-email-eldad@fogrefinery.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1341442827-21339-1-git-send-email-eldad@fogrefinery.com> References: <1341442827-21339-1-git-send-email-eldad@fogrefinery.com> X-Gm-Message-State: ALoCoQmT/RJJLRpdtnV4lXE2p3XVJupVWaqaVXeyjFnrWe7pMkx4am9XOISd+Oz/fxaGxKL7t154 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org This patch replaces the usage of simple_strtoul with kstrtoint in get_int(). Signed-off-by: Eldad Zack --- include/linux/sunrpc/cache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 0757887..9a60bcc 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -217,7 +217,7 @@ extern int qword_get(char **bpp, char *dest, int bufsize); static inline int get_int(char **bpp, int *anint) { char buf[50]; - char *ep; + ssize_t ret; int rv; int len = qword_get(bpp, buf, 50); @@ -226,8 +226,8 @@ static inline int get_int(char **bpp, int *anint) if (len == 0) return -ENOENT; - rv = simple_strtol(buf, &ep, 0); - if (*ep) + ret = kstrtoint(buf, 0, &rv); + if (ret) return -EINVAL; *anint = rv;