[PATCH staging-next] goldfish: bus: fix warnings for 32bit builds

From: Octavian Purdila
Date: Fri May 16 2014 - 01:25:39 EST


drivers/platform/goldfish/pdev_bus.c: In function 'goldfish_new_pdev':
drivers/platform/goldfish/pdev_bus.c:136:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
writel((u32)(u64)name, pdev_bus_base + PDEV_BUS_GET_NAME);

Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Cc: Jun Tian <jun.j.tian@xxxxxxxxx>
Cc: Alan Cox <alan@xxxxxxxxxxxxxxx>
Signed-off-by: Octavian Purdila <octavian.purdila@xxxxxxxxx>
---
drivers/platform/goldfish/pdev_bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/goldfish/pdev_bus.c b/drivers/platform/goldfish/pdev_bus.c
index eb25440..8c43589 100644
--- a/drivers/platform/goldfish/pdev_bus.c
+++ b/drivers/platform/goldfish/pdev_bus.c
@@ -133,7 +133,7 @@ static int goldfish_new_pdev(void)
#ifdef CONFIG_64BIT
writel((u32)((u64)name>>32), pdev_bus_base + PDEV_BUS_GET_NAME_HIGH);
#endif
- writel((u32)(u64)name, pdev_bus_base + PDEV_BUS_GET_NAME);
+ writel((u32)(unsigned long)name, pdev_bus_base + PDEV_BUS_GET_NAME);
name[name_len] = '\0';
dev->pdev.id = readl(pdev_bus_base + PDEV_BUS_ID);
dev->pdev.resource[0].start = base;
--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/