1
0
Fork 0

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>
hifive-unleashed-5.1
Cédric Le Goater 2014-04-24 09:23:32 +02:00 committed by Benjamin Herrenschmidt
parent 6413010936
commit b636031a7b
1 changed files with 1 additions and 1 deletions

View 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,