From patchwork Mon Oct 8 18:18:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 10631247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 166AF17E3 for ; Mon, 8 Oct 2018 18:27:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 071FE2994A for ; Mon, 8 Oct 2018 18:27:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE55E2995F; Mon, 8 Oct 2018 18:27:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6CD7A2994A for ; Mon, 8 Oct 2018 18:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uqgqt2yrqX+b+XMW0HCftjrYQvhBimCeOUIJ7VFX7V0=; b=dxMXbd/u/6k/dl QT7THx5K7PR6NmRTWSUxx2CmWxV+sgrPK390syEhv50BP8QySqsPqMeqOfVN/+lASpKC9XsPhq3sL Sp+x/L9f2CEgSE3uYRTSIrgNIV9kdT1f0C3GXzoOMmKPce/t6RCubYM+ndjeErVIIldMCmnPbzlCY Ca/67E6DMYoYwd9LCr7Zi6NhNmSeOlvdIBhr/qHOSFzZcuPBtGb/Z3LzNss+AFlK5Ax1o0jmDHqpx c5NnAreNxC2xkGSf6xoZMcqi9BHyf5joUMRRbpszwE7n6HbBmufnsNfycuP6Ic32jI5x0mcaJj+pY do4KA7C8njD2qdc4XtPA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g9aFa-0006bG-8U; Mon, 08 Oct 2018 18:27:26 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g9aDg-0005VR-V3; Mon, 08 Oct 2018 18:27:23 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2018 11:25:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,357,1534834800"; d="scan'208";a="77177794" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by fmsmga008.fm.intel.com with ESMTP; 08 Oct 2018 11:18:25 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1g9a6q-000BN7-UM; Tue, 09 Oct 2018 02:18:24 +0800 Date: Tue, 9 Oct 2018 02:18:00 +0800 From: kbuild test robot To: Hanjie Lin Subject: [PATCH] PCI: amlogic: fix ptr_ret.cocci warnings Message-ID: <20181008181800.GA119382@ivb43.lkp.intel.com> References: <1538999834-156423-3-git-send-email-hanjie.lin@amlogic.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1538999834-156423-3-git-send-email-hanjie.lin@amlogic.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181008_112529_107185_8B15CC38 X-CRM114-Status: GOOD ( 13.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, Shawn Lin , Qiufang Dai , Jerome Brunet , Rob Herring , Lorenzo Pieralisi , Kevin Hilman , Yixun Lan , Yue Wang , Cyrille Pitchen , Bjorn Helgaas , linux-amlogic@lists.infradead.org, Liang Yang , linux-arm-kernel@lists.infradead.org, Hanjie Lin , Jianxin Pan , Gustavo Pimentel , linux-kernel@vger.kernel.org, Jian Hu , kbuild-all@01.org, Philippe Ombredanne , Carlo Caione Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot drivers/pci/controller/dwc/pci-meson.c:190:1-3: WARNING: PTR_ERR_OR_ZERO can be used drivers/pci/controller/dwc/pci-meson.c:267:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 32cd91ffa92f ("PCI: amlogic: Add the Amlogic Meson PCIe controller driver") CC: Yue Wang Signed-off-by: kbuild test robot --- url: https://github.com/0day-ci/linux/commits/Hanjie-Lin/add-the-Amlogic-Meson-PCIe-controller-driver/20181009-001429 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next pci-meson.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) --- a/drivers/pci/controller/dwc/pci-meson.c +++ b/drivers/pci/controller/dwc/pci-meson.c @@ -187,10 +187,7 @@ static int meson_pcie_get_mems(struct pl /* Meson SoC has two PCI controllers use same phy register*/ mp->mem_res.phy_base = meson_pcie_get_mem_shared(pdev, mp, "phy"); - if (IS_ERR(mp->mem_res.phy_base)) - return PTR_ERR(mp->mem_res.phy_base); - - return 0; + return PTR_ERR_OR_ZERO(mp->mem_res.phy_base); } static void meson_pcie_power_on(struct meson_pcie *mp) @@ -264,10 +261,7 @@ static int meson_pcie_probe_clocks(struc return PTR_ERR(res->general_clk); res->clk = meson_pcie_probe_clock(dev, "pcie", 0); - if (IS_ERR(res->clk)) - return PTR_ERR(res->clk); - - return 0; + return PTR_ERR_OR_ZERO(res->clk); } static inline void meson_elb_writel(struct meson_pcie *mp, u32 val, u32 reg)