From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7DD1C433E2 for ; Thu, 3 Sep 2020 15:11:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD9152072A for ; Thu, 3 Sep 2020 15:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728886AbgICPLm (ORCPT ); Thu, 3 Sep 2020 11:11:42 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:10761 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728794AbgICM3x (ORCPT ); Thu, 3 Sep 2020 08:29:53 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4FA327C2F37E81201268; Thu, 3 Sep 2020 20:29:43 +0800 (CST) Received: from [10.57.101.250] (10.57.101.250) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Thu, 3 Sep 2020 20:29:34 +0800 Subject: Re: [PATCH] PCI: exynos: simplify with PTR_ERR_OR_ZERO To: , References: <1599123916-65530-1-git-send-email-xuwei5@hisilicon.com> CC: , , , , , , , , , , , Jingoo Han , Rob Herring , Kukjin Kim , Krzysztof Kozlowski , , , , From: Wei Xu Message-ID: <5F50E1AE.2020505@hisilicon.com> Date: Thu, 3 Sep 2020 20:29:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1599123916-65530-1-git-send-email-xuwei5@hisilicon.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.101.250] X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hi All, Sorry for the noise and please ignore it. I found these kind of changes have been sent and rejected before. Best Regards, Wei On 2020/9/3 17:05, Wei Xu wrote: > Use PTR_ERR_OR_ZERO to make the code a little bit simpler. > This code was detected with the help of Coccinelle. > > Signed-off-by: Wei Xu > --- > drivers/pci/controller/dwc/pci-exynos.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-exynos.c b/drivers/pci/controller/dwc/pci-exynos.c > index 8d82c43..f59f027 100644 > --- a/drivers/pci/controller/dwc/pci-exynos.c > +++ b/drivers/pci/controller/dwc/pci-exynos.c > @@ -90,10 +90,7 @@ static int exynos5440_pcie_get_mem_resources(struct platform_device *pdev, > return -ENOMEM; > > ep->mem_res->elbi_base = devm_platform_ioremap_resource(pdev, 0); > - if (IS_ERR(ep->mem_res->elbi_base)) > - return PTR_ERR(ep->mem_res->elbi_base); > - > - return 0; > + return PTR_ERR_OR_ZERO(ep->mem_res->elbi_base); > } > > static int exynos5440_pcie_get_clk_resources(struct exynos_pcie *ep) > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE539C433E9 for ; Thu, 3 Sep 2020 12:31:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8050520758 for ; Thu, 3 Sep 2020 12:31:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PwdThqen" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8050520758 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=hisilicon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QDDFsUsMTpCTarN+f6tg+uDBFkmn4Yce4IoNt6TSp7U=; b=PwdThqenHAXAuv4yTeQWPXp0h hMOP3QA3ywnReMFh11AGON3ZSK2rPEW/yuvwLb/Z33MsKXc4iDjOtS8aKccRsnOT9j0eSVDDva/69 +HdZpfUu0ZQrGxFulVeP59DcRp4zywnN5AyAkfrplEM8iuNGS2BC21DMzI2Kb0rzZ4SIYS9JuNT68 k/hXVYtOdOqWu/gAIZwUWclozFKUhkUDGMiOIfXIx9n++EkjkqfG7KJbhMByHE829XDhO+CdYz+nD ZwXySQgRs86slwywy2aPwAGWXcaS55ctmosHZhZR/cBaF3DdkGyTIOqUEDy5wdI0GxiosOGdFyR1e ccb5Mwddg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDoNE-0005jd-1i; Thu, 03 Sep 2020 12:29:52 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191] helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDoNB-0005hU-0q for linux-arm-kernel@lists.infradead.org; Thu, 03 Sep 2020 12:29:50 +0000 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 4FA327C2F37E81201268; Thu, 3 Sep 2020 20:29:43 +0800 (CST) Received: from [10.57.101.250] (10.57.101.250) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Thu, 3 Sep 2020 20:29:34 +0800 Subject: Re: [PATCH] PCI: exynos: simplify with PTR_ERR_OR_ZERO To: , References: <1599123916-65530-1-git-send-email-xuwei5@hisilicon.com> From: Wei Xu Message-ID: <5F50E1AE.2020505@hisilicon.com> Date: Thu, 3 Sep 2020 20:29:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1599123916-65530-1-git-send-email-xuwei5@hisilicon.com> X-Originating-IP: [10.57.101.250] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200903_082949_871631_F4A78B0F X-CRM114-Status: GOOD ( 14.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , salil.mehta@huawei.com, Krzysztof Kozlowski , jinying@hisilicon.com, tangkunshan@huawei.com, Jingoo Han , john.garry@huawei.com, linux-pci@vger.kernel.org, linuxarm@huawei.com, shameerali.kolothum.thodi@huawei.com, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Kukjin Kim , huangdaode@hisilicon.com, jonathan.cameron@huawei.com, liguozhu@hisilicon.com, zhangyi.ac@huawei.com, linux-arm-kernel@lists.infradead.org, shiju.jose@huawei.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi All, Sorry for the noise and please ignore it. I found these kind of changes have been sent and rejected before. Best Regards, Wei On 2020/9/3 17:05, Wei Xu wrote: > Use PTR_ERR_OR_ZERO to make the code a little bit simpler. > This code was detected with the help of Coccinelle. > > Signed-off-by: Wei Xu > --- > drivers/pci/controller/dwc/pci-exynos.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-exynos.c b/drivers/pci/controller/dwc/pci-exynos.c > index 8d82c43..f59f027 100644 > --- a/drivers/pci/controller/dwc/pci-exynos.c > +++ b/drivers/pci/controller/dwc/pci-exynos.c > @@ -90,10 +90,7 @@ static int exynos5440_pcie_get_mem_resources(struct platform_device *pdev, > return -ENOMEM; > > ep->mem_res->elbi_base = devm_platform_ioremap_resource(pdev, 0); > - if (IS_ERR(ep->mem_res->elbi_base)) > - return PTR_ERR(ep->mem_res->elbi_base); > - > - return 0; > + return PTR_ERR_OR_ZERO(ep->mem_res->elbi_base); > } > > static int exynos5440_pcie_get_clk_resources(struct exynos_pcie *ep) > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel