Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1452169ybi; Sat, 25 May 2019 02:17:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrRdJLBEntq4mlpArrqj0FjYvjWRTEt0YYHn86Pf7H2+HxKC8YTsK2+zp/uhT7a4rT8hMN X-Received: by 2002:aa7:9115:: with SMTP id 21mr90720434pfh.14.1558775852585; Sat, 25 May 2019 02:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558775852; cv=none; d=google.com; s=arc-20160816; b=B21A7NFzr7VWhLns4s9Dp1zUzW6naxPpNiOxwyXWcyaJk1orwJN4KNlvZM8oP2/uZb 0bgmF43nbTYlKnMMy63+f3MhviamIzf6RlfQk459ttgIkhm/wdFUR37pEyE+KVfL1D6v jwE2DHiJbisA9KpVi/GI2URt396FaHFJjD3i9NYMg1f7zZBEwLisMuW8MZo98DYpgsmI JK5KHpOnIs8uo7njHD0x7kQQ6iHWcRC4+aI1SHRipAtZ3Plf994CdAcbt3RcGILJUCx3 OuvIPizQoCXCfyMU7rxI0TGsLPh5nRjkaXsTSmcknCOexy97TkhOSH8dLJZZd7C0261B WuWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=0I0iYBrt5xIGBpHNoVr45Rx9KFD668cAF8Ky+1iHTBU=; b=o6AMwci8OAZVeAySzUzH+1nzbTG4Le6orZklff0ZqcFGNZcnV0dG9GmqB9tGQxCuJw q5inoDFPNvkzBHehEmJr6RzVa3USzD+ue11ypmJmi1mWsQMIy/rQ4dqzgHalw6oqowJA C5Js4b20XVJV1qD5b+IE2+JjXvZcb5WG5+6bZRE2Q0H0R8an0l3JnIBQNYAulNK3pLwF +LvRtNAtZfvfUxWAEeHtGY660EVWCBNgLoLfV+VTNe2p2cfffe48ViTwKEbyfi2yamhf kqxbm5DhPkT0hbtBmwoBGqa5MJjKuQtujocSMs3RyuzZzVgP/DbEnAHx8Mnb2gQNznOV Y3yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R5hK9LD0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r15si7837276pfq.169.2019.05.25.02.17.15; Sat, 25 May 2019 02:17:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R5hK9LD0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbfEYJQF (ORCPT + 99 others); Sat, 25 May 2019 05:16:05 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44706 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726432AbfEYJQE (ORCPT ); Sat, 25 May 2019 05:16:04 -0400 Received: by mail-pf1-f193.google.com with SMTP id g9so6721057pfo.11; Sat, 25 May 2019 02:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=0I0iYBrt5xIGBpHNoVr45Rx9KFD668cAF8Ky+1iHTBU=; b=R5hK9LD0MMAcb+MZkIyyc2ZzMnF9IvfB8Gu+uXzqBWyu0LntP//SFOsJBCqDPtmCnj Eocfg87oPsC8FRZRJES3LSbAhggyAtukai81SEdmPGwzhCtazBG5q+/fWCnwNrb3PHUy 3eKYGLUnS3ZFvkiFwlMlHN09FDGo2PSS0gdysh96vGCVdabDrwJoV6pMDssm/yUHcrr4 xJQoBrKh3VcDCn3Gm9bJTJqL3YmxvMAFYfkeupfqNEwrXuFtKY7zKeKmIAbdy3IVcd/Y XzIZ3u3taCn3/nGFtNsmMSUPiwEV42kEvfzRc4P3DEILbQeaqiQxR5SnuORdx+jw4usW f5pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=0I0iYBrt5xIGBpHNoVr45Rx9KFD668cAF8Ky+1iHTBU=; b=DHsKJJAp3byN+O0Qr2oNlM/Nl09ZcxvAH8IrPNERrBmrT1zaTBHRgzzj4jQ6btLoPt Bgh0VY1Ovgky2Oqa61L5WiHFhda/jEq/UA/Si5CzSrit++hvLQygmJFiaJh/NoO6oKb/ TIfgsqLggrKk5x/FUGs9+Lttrc2SajtymBafjLXqg4kqyzOnN01o5Ztay//3aVx+PZ8m KCiyWa7BADPlmB1hjV6YCXFH8XLylmGZzz0bbZTodfT0pNX7J5LN3hou/m/ScXyAVgcd nCae9ZMCAammcPH65dE4rAQudowBvNbkD2juH41nIj7btuz3318YqYFy/sqvHg3NTeFE pdIA== X-Gm-Message-State: APjAAAUO5pjeq1wisbGlc8w1u4Mp2Hl75SrsXP+L4+f11W0GY/dj9Oi9 gRVu9jlFW34TfTonAG5DJ6Q= X-Received: by 2002:a65:520b:: with SMTP id o11mr56516634pgp.184.1558775764141; Sat, 25 May 2019 02:16:04 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id v66sm11898260pfa.38.2019.05.25.02.16.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 May 2019 02:16:03 -0700 (PDT) Date: Sat, 25 May 2019 14:45:59 +0530 From: Hariprasad Kelam To: "Yan, Zheng" , Sage Weil , Ilya Dryomov , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ceph: fix warning PTR_ERR_OR_ZERO can be used Message-ID: <20190525091559.GA14633@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org change1: fix below warning reported by coccicheck /fs/ceph/export.c:371:33-39: WARNING: PTR_ERR_OR_ZERO can be used change2: typecasted PTR_ERR_OR_ZERO to long as dout expecting long Signed-off-by: Hariprasad Kelam --- fs/ceph/export.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/export.c b/fs/ceph/export.c index d3ef7ee42..15ff1b0 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c @@ -368,7 +368,7 @@ static struct dentry *ceph_get_parent(struct dentry *child) } out: dout("get_parent %p ino %llx.%llx err=%ld\n", - child, ceph_vinop(inode), (IS_ERR(dn) ? PTR_ERR(dn) : 0)); + child, ceph_vinop(inode), (long)PTR_ERR_OR_ZERO(dn)); return dn; } -- 2.7.4