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

powerpc/boot: Define typedef ihandle as u32

This makes ihandle 64bit friendly.

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
64130109 034e55e6

+6 -6
+1 -1
arch/powerpc/boot/of.h
··· 2 2 #define _PPC_BOOT_OF_H_ 3 3 4 4 typedef void *phandle; 5 - typedef void *ihandle; 5 + typedef u32 ihandle; 6 6 7 7 void of_init(void *promptr); 8 8 int of_call_prom(const char *service, int nargs, int nret, ...);
+5 -5
arch/powerpc/boot/oflib.c
··· 106 106 */ 107 107 static int need_map = -1; 108 108 static ihandle chosen_mmu; 109 - static phandle memory; 109 + static ihandle memory; 110 110 111 111 static int check_of_version(void) 112 112 { ··· 135 135 printf("no mmu\n"); 136 136 return 0; 137 137 } 138 - memory = (ihandle) of_call_prom("open", 1, 1, "/memory"); 139 - if (memory == (ihandle) -1) { 140 - memory = (ihandle) of_call_prom("open", 1, 1, "/memory@0"); 141 - if (memory == (ihandle) -1) { 138 + memory = of_call_prom("open", 1, 1, "/memory"); 139 + if (memory == PROM_ERROR) { 140 + memory = of_call_prom("open", 1, 1, "/memory@0"); 141 + if (memory == PROM_ERROR) { 142 142 printf("no memory node\n"); 143 143 return 0; 144 144 }