diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-07-20 20:20:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-07-20 20:20:56 -0400 |
commit | 1256efd5519a8eca2dfa6039ce5cf58f44d1626d (patch) | |
tree | 017d998937b938b8555a0b7b97db262919dc453c /arch/sparc64/kernel/mdesc.c | |
parent | f0429bf7a099c28b4806b68812b821ef6d1ddbcb (diff) |
[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>
Diffstat (limited to 'arch/sparc64/kernel/mdesc.c')
-rw-r--r-- | arch/sparc64/kernel/mdesc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/mdesc.c b/arch/sparc64/kernel/mdesc.c index 13a79fe5115b..cce4d0ddf5d5 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, | |||
83 | hp->handle_size = handle_size; | 83 | hp->handle_size = handle_size; |
84 | } | 84 | } |
85 | 85 | ||
86 | static struct mdesc_handle *mdesc_bootmem_alloc(unsigned int mdesc_size) | 86 | static struct mdesc_handle * __init mdesc_bootmem_alloc(unsigned int mdesc_size) |
87 | { | 87 | { |
88 | struct mdesc_handle *hp; | 88 | struct mdesc_handle *hp; |
89 | unsigned int handle_size, alloc_size; | 89 | unsigned int handle_size, alloc_size; |
@@ -123,7 +123,7 @@ static void mdesc_bootmem_free(struct mdesc_handle *hp) | |||
123 | } | 123 | } |
124 | } | 124 | } |
125 | 125 | ||
126 | static struct mdesc_mem_ops bootmem_mdesc_memops = { | 126 | static struct mdesc_mem_ops bootmem_mdesc_ops = { |
127 | .alloc = mdesc_bootmem_alloc, | 127 | .alloc = mdesc_bootmem_alloc, |
128 | .free = mdesc_bootmem_free, | 128 | .free = mdesc_bootmem_free, |
129 | }; | 129 | }; |
@@ -860,7 +860,7 @@ void __init sun4v_mdesc_init(void) | |||
860 | 860 | ||
861 | printk("MDESC: Size is %lu bytes.\n", len); | 861 | printk("MDESC: Size is %lu bytes.\n", len); |
862 | 862 | ||
863 | hp = mdesc_alloc(len, &bootmem_mdesc_memops); | 863 | hp = mdesc_alloc(len, &bootmem_mdesc_ops); |
864 | if (hp == NULL) { | 864 | if (hp == NULL) { |
865 | prom_printf("MDESC: alloc of %lu bytes failed.\n", len); | 865 | prom_printf("MDESC: alloc of %lu bytes failed.\n", len); |
866 | prom_halt(); | 866 | prom_halt(); |