Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/boot: Fix compile warning in 64bit

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>

authored by

Cédric Le Goater and committed by
Benjamin Herrenschmidt
b636031a 64130109

+1 -1
+1 -1
arch/powerpc/boot/oflib.c
··· 201 201 */ 202 202 void *of_finddevice(const char *name) 203 203 { 204 - return (phandle) of_call_prom("finddevice", 1, 1, name); 204 + return (void *) (unsigned long) of_call_prom("finddevice", 1, 1, name); 205 205 } 206 206 207 207 int of_getprop(const void *phandle, const char *name, void *buf,