* [PATCH] PCI: mvebu: mvebu_pcie_map_registers __iomem fix
@ 2019-10-15 16:11 Ben Dooks (Codethink)
2019-10-17 10:18 ` Lorenzo Pieralisi
0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks (Codethink) @ 2019-10-15 16:11 UTC (permalink / raw)
To: linux-kernel
Cc: Ben Dooks (Codethink), Thomas Petazzoni, Jason Cooper,
Lorenzo Pieralisi, Andrew Murray, Bjorn Helgaas, linux-pci,
linux-arm-kernel, linux-kernel
Fix the return type of mvebu_pcie_map_registers in the
error path to have __iomem on it. Fixes the following
sparse warning:
drivers/pci/controller/pci-mvebu.c:716:31: warning: incorrect type in return expression (different address spaces)
drivers/pci/controller/pci-mvebu.c:716:31: expected void [noderef] <asn:2> *
drivers/pci/controller/pci-mvebu.c:716:31: got void *
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Andrew Murray <andrew.murray@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
drivers/pci/controller/pci-mvebu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
index ed032e9a3156..153a64676bc9 100644
--- a/drivers/pci/controller/pci-mvebu.c
+++ b/drivers/pci/controller/pci-mvebu.c
@@ -713,7 +713,7 @@ static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev,
ret = of_address_to_resource(np, 0, ®s);
if (ret)
- return ERR_PTR(ret);
+ return (void __iomem *)ERR_PTR(ret);
return devm_ioremap_resource(&pdev->dev, ®s);
}
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: mvebu: mvebu_pcie_map_registers __iomem fix
2019-10-15 16:11 [PATCH] PCI: mvebu: mvebu_pcie_map_registers __iomem fix Ben Dooks (Codethink)
@ 2019-10-17 10:18 ` Lorenzo Pieralisi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2019-10-17 10:18 UTC (permalink / raw)
To: Ben Dooks (Codethink)
Cc: linux-kernel, Thomas Petazzoni, Jason Cooper, Andrew Murray,
Bjorn Helgaas, linux-pci, linux-arm-kernel, linux-kernel
On Tue, Oct 15, 2019 at 05:11:48PM +0100, Ben Dooks (Codethink) wrote:
> Fix the return type of mvebu_pcie_map_registers in the
> error path to have __iomem on it. Fixes the following
> sparse warning:
>
> drivers/pci/controller/pci-mvebu.c:716:31: warning: incorrect type in return expression (different address spaces)
> drivers/pci/controller/pci-mvebu.c:716:31: expected void [noderef] <asn:2> *
> drivers/pci/controller/pci-mvebu.c:716:31: got void *
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Jason Cooper <jason@lakedaemon.net>
> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Andrew Murray <andrew.murray@arm.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/pci/controller/pci-mvebu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to pci/misc, thanks.
Lorenzo
> diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
> index ed032e9a3156..153a64676bc9 100644
> --- a/drivers/pci/controller/pci-mvebu.c
> +++ b/drivers/pci/controller/pci-mvebu.c
> @@ -713,7 +713,7 @@ static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev,
>
> ret = of_address_to_resource(np, 0, ®s);
> if (ret)
> - return ERR_PTR(ret);
> + return (void __iomem *)ERR_PTR(ret);
>
> return devm_ioremap_resource(&pdev->dev, ®s);
> }
> --
> 2.23.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-17 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-15 16:11 [PATCH] PCI: mvebu: mvebu_pcie_map_registers __iomem fix Ben Dooks (Codethink)
2019-10-17 10:18 ` Lorenzo Pieralisi
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).