]> git.karo-electronics.de Git - linux-beck.git/commitdiff
powerpc/boot: Fix compile warning in 64bit
authorCédric Le Goater <clg@fr.ibm.com>
Thu, 24 Apr 2014 07:23:32 +0000 (09:23 +0200)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 28 Apr 2014 07:35:51 +0000 (17:35 +1000)
arch/powerpc/boot/oflib.c:211:9: warning: cast to pointer from integer of \
  different size [-Wint-to-pointer-cast]
  return (phandle) of_call_prom("finddevice", 1, 1, name);

This is a work around. The definite solution would be to define the
phandle typedef as a u32, as in the kernel, but this would break the
device tree ops API.

Let it be for the moment.

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/boot/oflib.c

index 956443fb9f654055710c76db31cc9e3b50e75901..cdfe762d2b2b5e5f24e2e03d8dc2008777d25f86 100644 (file)
@@ -201,7 +201,7 @@ void of_exit(void)
  */
 void *of_finddevice(const char *name)
 {
-       return (phandle) of_call_prom("finddevice", 1, 1, name);
+       return (void *) (unsigned long) of_call_prom("finddevice", 1, 1, name);
 }
 
 int of_getprop(const void *phandle, const char *name, void *buf,