diff mbox series

[v5,6/6] PCI: uniphier: Use devm_platform_ioremap_resource_byname()

Message ID 1592469493-1549-7-git-send-email-hayashi.kunihiko@socionext.com
State New
Headers show
Series PCI: uniphier: Add features for UniPhier PCIe host controller | expand

Commit Message

Kunihiko Hayashi June 18, 2020, 8:38 a.m. UTC
Use devm_platform_ioremap_resource_byname() to simplify the code a bit.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 drivers/pci/controller/dwc/pcie-uniphier.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Kunihiko Hayashi July 10, 2020, 12:54 a.m. UTC | #1
Hi Lorenzo,

This 6/6 patch has just been covered with the following patch:
https://patchwork.ozlabs.org/project/linux-pci/patch/20200708164013.5076-1-zhengdejin5@gmail.com/

As a result, my other patches conflict with this patch.
I'd like your comments in the patch 2/6, though,
should I rebase to pci/dwc and resend this series without 6/6?

Thank you,

On 2020/06/18 17:38, Kunihiko Hayashi wrote:
> Use devm_platform_ioremap_resource_byname() to simplify the code a bit.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>f
> ---
>   drivers/pci/controller/dwc/pcie-uniphier.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-uniphier.c b/drivers/pci/controller/dwc/pcie-uniphier.c
> index 8356dd3..233d624 100644
> --- a/drivers/pci/controller/dwc/pcie-uniphier.c
> +++ b/drivers/pci/controller/dwc/pcie-uniphier.c
> @@ -456,8 +456,7 @@ static int uniphier_pcie_probe(struct platform_device *pdev)
>   	if (IS_ERR(priv->pci.atu_base))
>   		priv->pci.atu_base = NULL;
>   
> -	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "link");
> -	priv->base = devm_ioremap_resource(dev, res);
> +	priv->base = devm_platform_ioremap_resource_byname(pdev, "link");
>   	if (IS_ERR(priv->base))
>   		return PTR_ERR(priv->base);
>   
> 

---
Best Regards
Kunihiko Hayashi
Lorenzo Pieralisi July 10, 2020, 1:29 p.m. UTC | #2
On Fri, Jul 10, 2020 at 09:54:12AM +0900, Kunihiko Hayashi wrote:
> Hi Lorenzo,
> 
> This 6/6 patch has just been covered with the following patch:
> https://patchwork.ozlabs.org/project/linux-pci/patch/20200708164013.5076-1-zhengdejin5@gmail.com/
> 
> As a result, my other patches conflict with this patch.
> I'd like your comments in the patch 2/6, though,
> should I rebase to pci/dwc and resend this series without 6/6?

No, don't worry about patch (6). I will review patch (2) shortly.

Thanks,
Lorenzo

> Thank you,
> 
> On 2020/06/18 17:38, Kunihiko Hayashi wrote:
> > Use devm_platform_ioremap_resource_byname() to simplify the code a bit.
> > 
> > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>f
> > ---
> >   drivers/pci/controller/dwc/pcie-uniphier.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/pci/controller/dwc/pcie-uniphier.c b/drivers/pci/controller/dwc/pcie-uniphier.c
> > index 8356dd3..233d624 100644
> > --- a/drivers/pci/controller/dwc/pcie-uniphier.c
> > +++ b/drivers/pci/controller/dwc/pcie-uniphier.c
> > @@ -456,8 +456,7 @@ static int uniphier_pcie_probe(struct platform_device *pdev)
> >   	if (IS_ERR(priv->pci.atu_base))
> >   		priv->pci.atu_base = NULL;
> > -	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "link");
> > -	priv->base = devm_ioremap_resource(dev, res);
> > +	priv->base = devm_platform_ioremap_resource_byname(pdev, "link");
> >   	if (IS_ERR(priv->base))
> >   		return PTR_ERR(priv->base);
> > 
> 
> ---
> Best Regards
> Kunihiko Hayashi
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pcie-uniphier.c b/drivers/pci/controller/dwc/pcie-uniphier.c
index 8356dd3..233d624 100644
--- a/drivers/pci/controller/dwc/pcie-uniphier.c
+++ b/drivers/pci/controller/dwc/pcie-uniphier.c
@@ -456,8 +456,7 @@  static int uniphier_pcie_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->pci.atu_base))
 		priv->pci.atu_base = NULL;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "link");
-	priv->base = devm_ioremap_resource(dev, res);
+	priv->base = devm_platform_ioremap_resource_byname(pdev, "link");
 	if (IS_ERR(priv->base))
 		return PTR_ERR(priv->base);