From patchwork Mon Oct 14 19:07:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Geyslan G. Bem" X-Patchwork-Id: 3038391 Return-Path: X-Original-To: patchwork-linux-nfs@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 248B5BF924 for ; Mon, 14 Oct 2013 19:12:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 14D852021A for ; Mon, 14 Oct 2013 19:12:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D2FB20218 for ; Mon, 14 Oct 2013 19:12:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757199Ab3JNTMM (ORCPT ); Mon, 14 Oct 2013 15:12:12 -0400 Received: from mail-vc0-f169.google.com ([209.85.220.169]:52142 "EHLO mail-vc0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756267Ab3JNTMK (ORCPT ); Mon, 14 Oct 2013 15:12:10 -0400 Received: by mail-vc0-f169.google.com with SMTP id ib11so4894883vcb.28 for ; Mon, 14 Oct 2013 12:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4HugSyW7UhUoU2OGbZUI1D8rNjsaojk/ZeJyAgTdGLY=; b=M6506oi120A5m0ZnRACv/fDFM9jLDjp+14Z0UEjf5Ggc8neBoGwaU40I2UgEILcQMQ pu5oy1Bt638WkG0c78r2pzO2E7khOGA/B9kYiYjOQ3mn+/Vl5n14oNkFkTakScf3urMR XOCPamxQeJrS2FVrTBH44igNHfOleTI1SkulPpukV6+ZUFrtldYBBywEQRU3gkbg3H1G CRKXSuGHnbbpdfa+hDvmAj71hXXDAcSzXoEjtNGOUa7mGvSuPn5M5quaSWuwZmMZfHyp ljT1awbfQPnZwgaA45Yur9mp5X42sN9DhO11dHt6QJ1UTDuxvukThMpaK/1i6DAqFaiw XK6w== X-Received: by 10.58.208.130 with SMTP id me2mr8400523vec.13.1381777929512; Mon, 14 Oct 2013 12:12:09 -0700 (PDT) Received: from localhost.localdomain (201-4-216-47.user.veloxzone.com.br. [201.4.216.47]) by mx.google.com with ESMTPSA id i8sm9268619vet.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Oct 2013 12:12:09 -0700 (PDT) From: "Geyslan G. Bem" To: Trond.Myklebust@netapp.com Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-br@googlegroups.com, "Geyslan G. Bem" Subject: [PATCH] nfs: Use PTR_ERR_OR_ZERO in 'nfs/nfs4super.c' Date: Mon, 14 Oct 2013 16:07:41 -0300 Message-Id: <1381777661-28780-2-git-send-email-geyslan@gmail.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1381777661-28780-1-git-send-email-geyslan@gmail.com> References: <1381777661-28780-1-git-send-email-geyslan@gmail.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Use 'PTR_ERR_OR_ZERO()' rather than 'IS_ERR(...) ? PTR_ERR(...) : 0'. Signed-off-by: Geyslan G. Bem --- fs/nfs/nfs4super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index e26acdd..ef71077 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c @@ -262,8 +262,8 @@ struct dentry *nfs4_try_mount(int flags, const char *dev_name, res = nfs_follow_remote_path(root_mnt, export_path); dfprintk(MOUNT, "<-- nfs4_try_mount() = %ld%s\n", - IS_ERR(res) ? PTR_ERR(res) : 0, - IS_ERR(res) ? " [error]" : ""); + PTR_ERR_OR_ZERO(res), + IS_ERR(res) ? " [error]" : ""); return res; } @@ -320,8 +320,8 @@ static struct dentry *nfs4_referral_mount(struct file_system_type *fs_type, res = nfs_follow_remote_path(root_mnt, export_path); dprintk("<-- nfs4_referral_mount() = %ld%s\n", - IS_ERR(res) ? PTR_ERR(res) : 0, - IS_ERR(res) ? " [error]" : ""); + PTR_ERR_OR_ZERO(res), + IS_ERR(res) ? " [error]" : ""); return res; }