Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp108251imm; Tue, 18 Sep 2018 17:43:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ9q/d16I6j8+xAtpXD2un5rB3JCnQOaMlkzEYll0XNeUEvlJkfVE9eM9eYncJUv2uvmwad X-Received: by 2002:a62:d709:: with SMTP id b9-v6mr851902pfh.91.1537317786422; Tue, 18 Sep 2018 17:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537317786; cv=none; d=google.com; s=arc-20160816; b=qeWRjgrLq1ypJ4HJJC2fua8pWFAt4hSWNKeCDOZ1dvR4GUW6xroJ0ZxSHShDoVjBd8 sx+ttuZjPVK7e36W8N98svq9luZ1Ad9otuCLl9Fojy5D01pN04hIGvwKHDmYip+LkkQM F3W27gHodx2VHJ6N217kCZwvckcCH+QcT1rVEVsR5+JU3969rKnV+svuk6tHBOmz/ojD IPGCANQnp/vSTVhqYwN0CcL0s97gURx15iwia914o0RD0OtVEWHNZufx65Jyshpdbypr vTf8pIHKPwk7rxKQ0u01lXiOujy6Lt+LTzBeVXctAH69l6ZWg7sPoc8uQKlzf32nncK3 kjRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=r6McpZAgwIUHX3j2EgXE/bRrpmqxMsFfNjqG7ndawdg=; b=C2kRwd6P5V9zSmFEkfveZtKHAU+XddjNJxOlMzSUQitdn8q5tk1srPNBIQaNv1UPNW xV7RW0IKcfacYnQ5yULPqjatR9CnJ/rHUrS05nGOMBFUsjrq/A+oWtBDAyRwerM6Pyqu kqjae8StbDIyNzETsHuISr+4q9FBdjCs2xOPnIcaXWxZwrhZ2Qj5pRMGkVfWVXnjLFt3 g84koVbbSKBxYXeuLyMCsnalI8rPOyXIVOEomXruL56mNjQNrNvqR092QdB0fFxQIMgR M/UjF0cC4M/j0PUP8+b0jnCNDwzsRy4L4uDR0ib/wInWM5gzK4E31uBnsfhTE10oAFlu +EBQ== 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 68-v6si20393966pff.55.2018.09.18.17.42.48; Tue, 18 Sep 2018 17:43:06 -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 S1729736AbeISGQQ convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 Sep 2018 02:16:16 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:6422 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726887AbeISGQQ (ORCPT ); Wed, 19 Sep 2018 02:16:16 -0400 Received: from DGGEMA402-HUB.china.huawei.com (unknown [10.3.20.43]) by Forcepoint Email with ESMTP id AB480707884B9; Wed, 19 Sep 2018 08:41:03 +0800 (CST) Received: from DGGEMA423-HUB.china.huawei.com (10.1.198.156) by DGGEMA402-HUB.china.huawei.com (10.3.20.43) with Microsoft SMTP Server (TLS) id 14.3.399.0; Wed, 19 Sep 2018 08:41:05 +0800 Received: from DGGEMA525-MBX.china.huawei.com ([169.254.6.250]) by dggema423-hub.china.huawei.com ([10.1.198.156]) with mapi id 14.03.0399.000; Wed, 19 Sep 2018 08:40:55 +0800 From: "Songxiaowei (Kirin_DRV)" To: Lorenzo Pieralisi , kbuild test robot , "Wangbinghui (Biggio, Kirin_DRV)" CC: Shawn Lin , "kbuild-all@01.org" , "linux-kernel@vger.kernel.org" , Bjorn Helgaas Subject: RE: [PATCH] PCI: fix ptr_ret.cocci warnings Thread-Topic: [PATCH] PCI: fix ptr_ret.cocci warnings Thread-Index: AQHUT1rooSgHLqeFvkqN7xyKYxgBgKT2w/9g Date: Wed, 19 Sep 2018 00:40:55 +0000 Message-ID: <99B4C6BADD9E3241B25E52B02BA737C541375D26@dggema525-mbx.china.huawei.com> References: <201807200739.O5DHU6D3%fengguang.wu@intel.com> <20180719234243.GA4239@athens> <20180918142122.GB32243@e107981-ln.cambridge.arm.com> In-Reply-To: <20180918142122.GB32243@e107981-ln.cambridge.arm.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.142.52.233] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org That's OK, and thank a lot. > -----Original Message----- > From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com] > Sent: Tuesday, September 18, 2018 10:21 PM > To: kbuild test robot ; Songxiaowei (Kirin_DRV) > ; Wangbinghui (Biggio, Kirin_DRV) > > Cc: Shawn Lin ; kbuild-all@01.org; > linux-kernel@vger.kernel.org; Bjorn Helgaas > Subject: Re: [PATCH] PCI: fix ptr_ret.cocci warnings > > 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)