diff mbox

[V3,1/3] PCI: tegra: add missing __iomem annotation

Message ID 000c01ceb816$19f0dd10$4dd29730$%han@samsung.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Jingoo Han Sept. 23, 2013, 4:33 a.m. UTC
Added missing __iomem annotation in order to fix the following
sparse warnings:

drivers/pci/host/pci-tegra.c:411:41: warning: incorrect type in return expression (different address spaces)
drivers/pci/host/pci-tegra.c:411:41:    expected void [noderef] <asn:2>*
drivers/pci/host/pci-tegra.c:411:41:    got void *addr
drivers/pci/host/pci-tegra.c:419:25: warning: incorrect type in return expression (different address spaces)
drivers/pci/host/pci-tegra.c:419:25:    expected void [noderef] <asn:2>*
drivers/pci/host/pci-tegra.c:419:25:    got void *addr

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Thierry Reding <treding@nvidia.com>
---
 drivers/pci/host/pci-tegra.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bjorn Helgaas Sept. 27, 2013, 7:29 p.m. UTC | #1
On Sun, Sep 22, 2013 at 10:33 PM, Jingoo Han <jg1.han@samsung.com> wrote:
> Added missing __iomem annotation in order to fix the following
> sparse warnings:
>
> drivers/pci/host/pci-tegra.c:411:41: warning: incorrect type in return expression (different address spaces)
> drivers/pci/host/pci-tegra.c:411:41:    expected void [noderef] <asn:2>*
> drivers/pci/host/pci-tegra.c:411:41:    got void *addr
> drivers/pci/host/pci-tegra.c:419:25: warning: incorrect type in return expression (different address spaces)
> drivers/pci/host/pci-tegra.c:419:25:    expected void [noderef] <asn:2>*
> drivers/pci/host/pci-tegra.c:419:25:    got void *addr
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> Acked-by: Thierry Reding <treding@nvidia.com>

Applied to my pci/host-tegra branch for v3.13.  Thanks!

Bjorn

> ---
>  drivers/pci/host/pci-tegra.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> index 2e9888a..7c4f38d 100644
> --- a/drivers/pci/host/pci-tegra.c
> +++ b/drivers/pci/host/pci-tegra.c
> @@ -408,7 +408,7 @@ static void __iomem *tegra_pcie_bus_map(struct tegra_pcie *pcie,
>
>         list_for_each_entry(bus, &pcie->busses, list)
>                 if (bus->nr == busnr)
> -                       return bus->area->addr;
> +                       return (void __iomem *)bus->area->addr;
>
>         bus = tegra_pcie_bus_alloc(pcie, busnr);
>         if (IS_ERR(bus))
> @@ -416,7 +416,7 @@ static void __iomem *tegra_pcie_bus_map(struct tegra_pcie *pcie,
>
>         list_add_tail(&bus->list, &pcie->busses);
>
> -       return bus->area->addr;
> +       return (void __iomem *)bus->area->addr;
>  }
>
>  static void __iomem *tegra_pcie_conf_address(struct pci_bus *bus,
> --
> 1.7.10.4
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 2e9888a..7c4f38d 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -408,7 +408,7 @@  static void __iomem *tegra_pcie_bus_map(struct tegra_pcie *pcie,
 
 	list_for_each_entry(bus, &pcie->busses, list)
 		if (bus->nr == busnr)
-			return bus->area->addr;
+			return (void __iomem *)bus->area->addr;
 
 	bus = tegra_pcie_bus_alloc(pcie, busnr);
 	if (IS_ERR(bus))
@@ -416,7 +416,7 @@  static void __iomem *tegra_pcie_bus_map(struct tegra_pcie *pcie,
 
 	list_add_tail(&bus->list, &pcie->busses);
 
-	return bus->area->addr;
+	return (void __iomem *)bus->area->addr;
 }
 
 static void __iomem *tegra_pcie_conf_address(struct pci_bus *bus,