goldfish: bus: fix warnings for 32bit builds
authorOctavian Purdila <octavian.purdila@intel.com>
Fri, 16 May 2014 05:24:58 +0000 (08:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 May 2014 18:32:51 +0000 (11:32 -0700)
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@intel.com>
Cc: Jun Tian <jun.j.tian@intel.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/goldfish/pdev_bus.c

index eb254400c44a3ba4058fca723c6a8f4ef7ec7886..8c43589c3edba9248c13760c8e92025b4a5cf599 100644 (file)
@@ -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;