Skip to content

Commit b636031

Browse files
Cédric Le Goaterozbenh
authored andcommitted
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>
1 parent 6413010 commit b636031

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/powerpc/boot/oflib.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void of_exit(void)
201201
*/
202202
void *of_finddevice(const char *name)
203203
{
204-
return (phandle) of_call_prom("finddevice", 1, 1, name);
204+
return (void *) (unsigned long) of_call_prom("finddevice", 1, 1, name);
205205
}
206206

207207
int of_getprop(const void *phandle, const char *name, void *buf,

0 commit comments

Comments
 (0)