From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx1.suse.de", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTP id 3E83B679F8 for ; Sat, 4 Mar 2006 04:34:23 +1100 (EST) Date: Fri, 3 Mar 2006 18:34:17 +0100 From: Olaf Hering To: Paul Mackeras , linuxppc-dev@ozlabs.org Subject: [PATCH] mark a few functions as __init Message-ID: <20060303173417.GA6758@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 arch/powerpc/kernel/prom_init.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: linux-2.6.16-rc5-olh/arch/powerpc/kernel/prom_init.c =================================================================== --- linux-2.6.16-rc5-olh.orig/arch/powerpc/kernel/prom_init.c +++ linux-2.6.16-rc5-olh/arch/powerpc/kernel/prom_init.c @@ -435,7 +435,7 @@ static int inline prom_getproplen(phandl return 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 *c return 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);