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 1F390C433E9 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 DC82F20716 for ; Thu, 3 Sep 2020 15:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729145AbgICPLq (ORCPT ); Thu, 3 Sep 2020 11:11:46 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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) >