diff mbox

[V2,3/3] PCI: mvebu: add missing __iomem annotation

Message ID 001c01ceb366$9bad8740$d30895c0$%han@samsung.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Jingoo Han Sept. 17, 2013, 5:27 a.m. UTC
Added missing __iomem annotation in order to fix the following
sparse warning:

drivers/pci/host/pci-mvebu.c:744:31: warning: incorrect type in return expression (different address spaces)
drivers/pci/host/pci-mvebu.c:744:31:    expected void [noderef] <asn:2>*
drivers/pci/host/pci-mvebu.c:744:31:    got void *

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 drivers/pci/host/pci-mvebu.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Thomas Petazzoni Sept. 17, 2013, 5:42 p.m. UTC | #1
Dear Jingoo Han,

On Tue, 17 Sep 2013 14:27:31 +0900, Jingoo Han wrote:
> Added missing __iomem annotation in order to fix the following
> sparse warning:

I believe your commit title and log is now wrong: this commit is not
adding an iomem annotation anywhere.

Thanks!

Thomas
Jingoo Han Sept. 23, 2013, 2:27 a.m. UTC | #2
On Wednesday, September 18, 2013 2:42 AM, Thomas Petazzoni wrote:
> On Tue, 17 Sep 2013 14:27:31 +0900, Jingoo Han wrote:
> > Added missing __iomem annotation in order to fix the following
> > sparse warning:
> 
> I believe your commit title and log is now wrong: this commit is not
> adding an iomem annotation anywhere.
> 

Yes, you're right.
I will fix the commit title and log, and send v3 patch, soon.
Thank you for your comment. :-)

Best regards,
Jingoo Han


--
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-mvebu.c b/drivers/pci/host/pci-mvebu.c
index b54ceb1..fb2474f 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -741,7 +741,7 @@  static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev,
 
 	ret = of_address_to_resource(np, 0, &regs);
 	if (ret)
-		return ERR_PTR(ret);
+		return NULL;
 
 	return devm_ioremap_resource(&pdev->dev, &regs);
 }
@@ -940,11 +940,10 @@  static int mvebu_pcie_probe(struct platform_device *pdev)
 			continue;
 
 		port->base = mvebu_pcie_map_registers(pdev, child, port);
-		if (IS_ERR(port->base)) {
+		if (!port->base) {
 			dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n",
 				port->port, port->lane);
 			clk_disable_unprepare(port->clk);
-			port->base = NULL;
 			continue;
 		}