* [PATCH] PCI: dwc: artpec6: Use devm_ioremap_resource instead of devm_ioremap_resource
@ 2018-04-18 8:06 Gustavo Pimentel
2018-04-18 20:59 ` Jesper Nilsson
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo Pimentel @ 2018-04-18 8:06 UTC (permalink / raw)
To: bhelgaas, lorenzo.pieralisi, jesper.nilsson; +Cc: linux-pci, gustavo.pimentel
This fix aims to replace the use of devm_ioremap() by
devm_ioremap_resource() already discussed on [1].
[1] -> https://patchwork.kernel.org/patch/10173831/
Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
---
drivers/pci/dwc/pcie-artpec6.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/dwc/pcie-artpec6.c b/drivers/pci/dwc/pcie-artpec6.c
index e66cede..321b56c 100644
--- a/drivers/pci/dwc/pcie-artpec6.c
+++ b/drivers/pci/dwc/pcie-artpec6.c
@@ -463,9 +463,9 @@ static int artpec6_add_pcie_ep(struct artpec6_pcie *artpec6_pcie,
ep->ops = &pcie_ep_ops;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi2");
- pci->dbi_base2 = devm_ioremap(dev, res->start, resource_size(res));
- if (!pci->dbi_base2)
- return -ENOMEM;
+ pci->dbi_base2 = devm_ioremap_resource(dev, res);
+ if (IS_ERR(pci->dbi_base2))
+ return PTR_ERR(pci->dbi_base2);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space");
if (!res)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: dwc: artpec6: Use devm_ioremap_resource instead of devm_ioremap_resource
2018-04-18 8:06 [PATCH] PCI: dwc: artpec6: Use devm_ioremap_resource instead of devm_ioremap_resource Gustavo Pimentel
@ 2018-04-18 20:59 ` Jesper Nilsson
0 siblings, 0 replies; 2+ messages in thread
From: Jesper Nilsson @ 2018-04-18 20:59 UTC (permalink / raw)
To: Gustavo Pimentel; +Cc: bhelgaas, lorenzo.pieralisi, jespern, linux-pci
On Wed, Apr 18, 2018 at 09:06:33AM +0100, Gustavo Pimentel wrote:
> This fix aims to replace the use of devm_ioremap() by
> devm_ioremap_resource() already discussed on [1].
>
> [1] -> https://patchwork.kernel.org/patch/10173831/
>
> Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Looks good:
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
> ---
> drivers/pci/dwc/pcie-artpec6.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/dwc/pcie-artpec6.c b/drivers/pci/dwc/pcie-artpec6.c
> index e66cede..321b56c 100644
> --- a/drivers/pci/dwc/pcie-artpec6.c
> +++ b/drivers/pci/dwc/pcie-artpec6.c
> @@ -463,9 +463,9 @@ static int artpec6_add_pcie_ep(struct artpec6_pcie *artpec6_pcie,
> ep->ops = &pcie_ep_ops;
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi2");
> - pci->dbi_base2 = devm_ioremap(dev, res->start, resource_size(res));
> - if (!pci->dbi_base2)
> - return -ENOMEM;
> + pci->dbi_base2 = devm_ioremap_resource(dev, res);
> + if (IS_ERR(pci->dbi_base2))
> + return PTR_ERR(pci->dbi_base2);
>
> res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space");
> if (!res)
> --
> 2.7.4
>
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-18 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-18 8:06 [PATCH] PCI: dwc: artpec6: Use devm_ioremap_resource instead of devm_ioremap_resource Gustavo Pimentel
2018-04-18 20:59 ` Jesper Nilsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).