From: Wei Xu <xuwei5@hisilicon.com>
To: <lorenzo.pieralisi@arm.com>, <bhelgaas@google.com>
Cc: <linuxarm@huawei.com>, <shameerali.kolothum.thodi@huawei.com>,
<jonathan.cameron@huawei.com>, <john.garry@huawei.com>,
<salil.mehta@huawei.com>, <shiju.jose@huawei.com>,
<jinying@hisilicon.com>, <zhangyi.ac@huawei.com>,
<liguozhu@hisilicon.com>, <tangkunshan@huawei.com>,
<huangdaode@hisilicon.com>, Jingoo Han <jingoohan1@gmail.com>,
Rob Herring <robh@kernel.org>, Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
<linux-pci@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-samsung-soc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: exynos: simplify with PTR_ERR_OR_ZERO
Date: Thu, 3 Sep 2020 20:29:34 +0800 [thread overview]
Message-ID: <5F50E1AE.2020505@hisilicon.com> (raw)
In-Reply-To: <1599123916-65530-1-git-send-email-xuwei5@hisilicon.com>
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 <xuwei5@hisilicon.com>
> ---
> 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)
>
WARNING: multiple messages have this Message-ID (diff)
From: Wei Xu <xuwei5@hisilicon.com>
To: <lorenzo.pieralisi@arm.com>, <bhelgaas@google.com>
Cc: Rob Herring <robh@kernel.org>,
salil.mehta@huawei.com, Krzysztof Kozlowski <krzk@kernel.org>,
jinying@hisilicon.com, tangkunshan@huawei.com,
Jingoo Han <jingoohan1@gmail.com>,
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 <kgene@kernel.org>,
huangdaode@hisilicon.com, jonathan.cameron@huawei.com,
liguozhu@hisilicon.com, zhangyi.ac@huawei.com,
linux-arm-kernel@lists.infradead.org, shiju.jose@huawei.com
Subject: Re: [PATCH] PCI: exynos: simplify with PTR_ERR_OR_ZERO
Date: Thu, 3 Sep 2020 20:29:34 +0800 [thread overview]
Message-ID: <5F50E1AE.2020505@hisilicon.com> (raw)
In-Reply-To: <1599123916-65530-1-git-send-email-xuwei5@hisilicon.com>
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 <xuwei5@hisilicon.com>
> ---
> 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
next prev parent reply other threads:[~2020-09-03 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 9:05 [PATCH] PCI: exynos: simplify with PTR_ERR_OR_ZERO Wei Xu
2020-09-03 9:05 ` Wei Xu
2020-09-03 12:29 ` Wei Xu [this message]
2020-09-03 12:29 ` Wei Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5F50E1AE.2020505@hisilicon.com \
--to=xuwei5@hisilicon.com \
--cc=bhelgaas@google.com \
--cc=huangdaode@hisilicon.com \
--cc=jingoohan1@gmail.com \
--cc=jinying@hisilicon.com \
--cc=john.garry@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=liguozhu@hisilicon.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=robh@kernel.org \
--cc=salil.mehta@huawei.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shiju.jose@huawei.com \
--cc=tangkunshan@huawei.com \
--cc=zhangyi.ac@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.