summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-07-20 17:20:56 -0700
committerDavid S. Miller <davem@davemloft.net>2007-07-20 17:20:56 -0700
commit1256efd5519a8eca2dfa6039ce5cf58f44d1626d (patch)
tree017d998937b938b8555a0b7b97db262919dc453c
parentf0429bf7a099c28b4806b68812b821ef6d1ddbcb (diff)
downloadop-kernel-dev-1256efd5519a8eca2dfa6039ce5cf58f44d1626d.zip
op-kernel-dev-1256efd5519a8eca2dfa6039ce5cf58f44d1626d.tar.gz
[SPARC64]: fix section mismatch warning in mdesc.c
Fix following warning: WARNING: vmlinux.o(.text+0x35264): Section mismatch: reference to .init.text:__alloc_bootmem (between 'mdesc_bootmem_alloc' and 'mdesc_bootmem_free') Rename mdesc_mem_ops to *_ops so modpost ignores __init references and declare mdesc_bootmem_alloc __init since it is only used during __init context. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/mdesc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/mdesc.c b/arch/sparc64/kernel/mdesc.c
index 13a79fe..cce4d0d 100644
--- a/arch/sparc64/kernel/mdesc.c
+++ b/arch/sparc64/kernel/mdesc.c
@@ -83,7 +83,7 @@ static void mdesc_handle_init(struct mdesc_handle *hp,
hp->handle_size = handle_size;
}
-static struct mdesc_handle *mdesc_bootmem_alloc(unsigned int mdesc_size)
+static struct mdesc_handle * __init mdesc_bootmem_alloc(unsigned int mdesc_size)
{
struct mdesc_handle *hp;
unsigned int handle_size, alloc_size;
@@ -123,7 +123,7 @@ static void mdesc_bootmem_free(struct mdesc_handle *hp)
}
}
-static struct mdesc_mem_ops bootmem_mdesc_memops = {
+static struct mdesc_mem_ops bootmem_mdesc_ops = {
.alloc = mdesc_bootmem_alloc,
.free = mdesc_bootmem_free,
};
@@ -860,7 +860,7 @@ void __init sun4v_mdesc_init(void)
printk("MDESC: Size is %lu bytes.\n", len);
- hp = mdesc_alloc(len, &bootmem_mdesc_memops);
+ hp = mdesc_alloc(len, &bootmem_mdesc_ops);
if (hp == NULL) {
prom_printf("MDESC: alloc of %lu bytes failed.\n", len);
prom_halt();
OpenPOWER on IntegriCloud