mark a few functions as __init
PATCH 1/1 mark a few functions as __init
Mark a few functions as __init.
IFF gcc does not inline them, they end up in .text. Make 2 local functions static.
Mark fake_elf as initdata.
Signed-off-by Olaf Hering <[email protected]>
arch/powerpc/kernel/prom_init.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
arch/powerpc/kernel/prom_init.c +6 -6
@@ -435,7 +435,7 @@ static int inline prom_getproplen(phandlreturn call_prom ("getproplen" ,2 ,1 , node,ADDR (pname)); } -static void add_string (char **str,const char *q) +static void __init add_string (char **str,const char *q) {char *p = *str;
@@ -445,7 +445,7 @@ static void add_string(char **str, const *str = p; } -static char *tohex (unsigned int x) +static char __init *tohex (unsigned int x) {static char digits[] ="0123456789abcdef" ;static char result[9 ];
@@ -492,7 +492,7 @@ static int __init prom_setprop(phandle n#define islower (c) ('a' <= (c) && (c) <= 'z')#define toupper (c) (islower(c) ? ((c) - 'a' + 'A') : (c)) -unsigned long prom_strtoul (const char *cp,const char **endp) +static unsigned long __init prom_strtoul (const char *cp,const char **endp) {unsigned long result =0 , base =10 , value;
@@ -517,7 +517,7 @@ unsigned long prom_strtoul(const char *creturn result; } -unsigned long prom_memparse (const char *ptr,const char **retptr) +static unsigned long __init prom_memparse (const char *ptr,const char **retptr) {unsigned long ret =prom_strtoul (ptr, retptr);int shift =0 ;
@@ -659,7 +659,7 @@ static struct fake_elf {u32 ignore_me; } rpadesc; } rpanote; -} fake_elf = { +} fake_elf __initdata = { .elfhdr = { .e_ident = { 0x7f, 'E', 'L', 'F', ELFCLASS32, ELFDATA2MSB, EV_CURRENT },
@@ -891,7 +891,7 @@ static unsigned long __init prom_next_ce* If problems seem to show up, it would be a good start to track * them down. */ -static void reserve_mem (u64 base,u64 size) +static void __init reserve_mem (u64 base,u64 size) {u64 top = base + size;unsigned long cnt =RELOC (mem_reserve_cnt);