Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5294368imm; Tue, 18 Sep 2018 07:21:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYe/f+oX2EoIvrF9PJC9n0OP79xpWzJWqw8sRIDz5yp1M0mUbAbHu7SlDjlcBQ27VyAuleu X-Received: by 2002:a17:902:f213:: with SMTP id gn19mr29914182plb.266.1537280515599; Tue, 18 Sep 2018 07:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537280515; cv=none; d=google.com; s=arc-20160816; b=CuJp+CntXgbKsckMQ4eUZ4WLRxdWcz3hchKqiaf4a8+g+4Q0dkbtQV/AH+SlpCMVqb 7PgbmCIbW2xYjFESX4REo5ODyiAMY729TVSY/Wn+4Zb7NP0EQ/9qR5zrXUXYF9Ku+Ewe sIkjG8mLKijSoJSiuKi3IiPanUWqv7VVSUDZUUCqzDTgIASJkSEQEgQ0lOl0jazesXz1 I9k83q7mRBCMQ75tdFTgcwUjMjiF9LeCtBJZJOZPSxD5D+gmsixxqpz//6Ep1p/jWHAl fn9/+sxWjzPpK2j/YeR42trhBFlcsyKy3w95FeIsnKxaENfzZebQ6kzbk5/kHp6/voMi Pb9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=29cj9k1j8z6r1B2MVLREatOsjWMfxPUu4L6XWZy5prw=; b=nIpWxMgGVluGNiO3ZuGZIs62f87gafP/UHdkhCrpFiInrfFBz9NpqY3H5qqOtHgPE2 qVzQbW8yuhtvuwdBFbN7HCzzTQg5w+/IKxjv/ek0/xD+C+rGDo8TlTOePgMHNMxzo4mq mWYs+TvjPEARHZyl80zP8FpkBhqxsYQE1cckWDnQ/vGi0pLJzFPBP32MNKNOl8BHbVsl i7/rEq1CBwwyXDPkRjCWa4CNVwRbK11Ylmd83u/kqaH02spBerh9b2OQM7JKoglAWx89 WdtTJIjLdy5t5SoACV1H3t1D+JJNIW+aoBwUwoCPBVvPQgBLP5hJNJQETvH9qgCfHKB+ PgdA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n68-v6si18653766pga.662.2018.09.18.07.21.39; Tue, 18 Sep 2018 07:21:55 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729689AbeIRTyP (ORCPT + 99 others); Tue, 18 Sep 2018 15:54:15 -0400 Received: from foss.arm.com ([217.140.101.70]:45742 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727228AbeIRTyP (ORCPT ); Tue, 18 Sep 2018 15:54:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C4CEA7A9; Tue, 18 Sep 2018 07:21:26 -0700 (PDT) Received: from e107981-ln.cambridge.arm.com (e107981-ln.emea.arm.com [10.4.13.117]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6F1333F5BD; Tue, 18 Sep 2018 07:21:25 -0700 (PDT) Date: Tue, 18 Sep 2018 15:21:22 +0100 From: Lorenzo Pieralisi To: kbuild test robot , Xiaowei Song , Binghui Wang Cc: Shawn Lin , kbuild-all@01.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: Re: [PATCH] PCI: fix ptr_ret.cocci warnings Message-ID: <20180918142122.GB32243@e107981-ln.cambridge.arm.com> References: <201807200739.O5DHU6D3%fengguang.wu@intel.com> <20180719234243.GA4239@athens> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180719234243.GA4239@athens> 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 On Fri, Jul 20, 2018 at 07:42:43AM +0800, kbuild test robot wrote: > From: kbuild test robot > > drivers/pci/controller/dwc/pcie-kirin.c:141:1-3: WARNING: PTR_ERR_OR_ZERO can be used > drivers/pci/controller/dwc/pcie-kirin.c:177: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: 6e0832fa432e ("PCI: Collect all native drivers under drivers/pci/controller/") > CC: Shawn Lin > Signed-off-by: kbuild test robot > --- > > pcie-kirin.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) Xiaowei, Binghui, are you OK with this change ? I will remove the Fixes: tag from the patch. Let me know, thanks. Lorenzo > --- a/drivers/pci/controller/dwc/pcie-kirin.c > +++ b/drivers/pci/controller/dwc/pcie-kirin.c > @@ -138,10 +138,7 @@ static long kirin_pcie_get_clk(struct ki > return PTR_ERR(kirin_pcie->apb_sys_clk); > > kirin_pcie->pcie_aclk = devm_clk_get(dev, "pcie_aclk"); > - if (IS_ERR(kirin_pcie->pcie_aclk)) > - return PTR_ERR(kirin_pcie->pcie_aclk); > - > - return 0; > + return PTR_ERR_OR_ZERO(kirin_pcie->pcie_aclk); > } > > static long kirin_pcie_get_resource(struct kirin_pcie *kirin_pcie, > @@ -174,10 +171,7 @@ static long kirin_pcie_get_resource(stru > > kirin_pcie->sysctrl = > syscon_regmap_lookup_by_compatible("hisilicon,hi3660-sctrl"); > - if (IS_ERR(kirin_pcie->sysctrl)) > - return PTR_ERR(kirin_pcie->sysctrl); > - > - return 0; > + return PTR_ERR_OR_ZERO(kirin_pcie->sysctrl); > } > > static int kirin_pcie_phy_init(struct kirin_pcie *kirin_pcie)