sparsemem: Shut up unused symbol compiler warnings.
Subsystems (2)
PATCH 1/1 sparsemem: Shut up unused symbol compiler warnings.
__kmalloc_section_memmap()/__kfree_section_memmap() and friends are only used by the memory hotplug code. Move these in to the existing CONFIG_MEMORY_HOTPLUG block.
--
mm/sparse.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-)
mm/sparse.c +21 -21
@@ -229,6 +229,7 @@ static struct page __init *sparse_early_mem_map_alloc(unsigned long pnum)return NULL ; } +#ifdef CONFIG_MEMORY_HOTPLUG static struct page *__kmalloc_section_memmap (unsigned long nr_pages) {struct page *page, *ret;
@@ -269,27 +270,6 @@ static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages) }/* -* Allocate the accumulated non-linear sections, allocate a mem_map -* for each and record the physical to section mapping. -*/ -void __init sparse_init (void ) -{ -unsigned long pnum; -struct page *map; - -for (pnum =0 ; pnum <NR_MEM_SECTIONS ; pnum++) { -if (!valid_section_nr (pnum)) -continue ; - - map =sparse_early_mem_map_alloc (pnum); -if (!map) -continue ; -sparse_init_one_section (__nr_to_section (pnum), pnum, map); - } -} - -#ifdef CONFIG_MEMORY_HOTPLUG -/* * returns the number of sections whose mem_maps were properly * set. If this is <=0, then that means that the passed-in * map was not consumed and must be freed.
@@ -329,3 +309,23 @@ out:return ret; }#endif + +/* +* Allocate the accumulated non-linear sections, allocate a mem_map +* for each and record the physical to section mapping. +*/ +void __init sparse_init (void ) +{ +unsigned long pnum; +struct page *map; + +for (pnum =0 ; pnum <NR_MEM_SECTIONS ; pnum++) { +if (!valid_section_nr (pnum)) +continue ; + + map =sparse_early_mem_map_alloc (pnum); +if (!map) +continue ; +sparse_init_one_section (__nr_to_section (pnum), pnum, map); + } +}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
I think this issue is fixed by move-three-functions-that-are-only-needed-for.patch in current -mm tree. Is it not enough?
Thanks.
Quoted 81 lines
__kmalloc_section_memmap()/__kfree_section_memmap() and friends are only used by the memory hotplug code. Move these in to the existing
CONFIG_MEMORY_HOTPLUGblock.Signed-off-by Paul Mundt <[email protected]>--
mm/sparse.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-)mm/sparse.c +21
-22@@ -229,6 +229,7 @@ static struct page __init *sparse_early_mem_map_alloc(unsigned long pnum)return NULL ; } +#ifdef CONFIG_MEMORY_HOTPLUG static struct page *__kmalloc_section_memmap (unsigned long nr_pages) {struct page *page, *ret;@@ -269,27 +270,6 @@ static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages) }/* -* Allocate the accumulated non-linear sections, allocate a mem_map -* for each and record the physical to section mapping. -*/ -void __init sparse_init (void ) -{ -unsigned long pnum; -struct page *map; - -for (pnum =0 ; pnum <NR_MEM_SECTIONS ; pnum++) { -if (!valid_section_nr (pnum)) -continue ; - - map =sparse_early_mem_map_alloc (pnum); -if (!map) -continue ; -sparse_init_one_section (__nr_to_section (pnum), pnum, map); - } -} - -#ifdef CONFIG_MEMORY_HOTPLUG -/* * returns the number of sections whose mem_maps were properly * set. If this is <=0, then that means that the passed-in * map was not consumed and must be freed. @@ -329,3 +309,23 @@ out:return ret; }#endif + +/* +* Allocate the accumulated non-linear sections, allocate a mem_map +* for each and record the physical to section mapping. +*/ +void __init sparse_init (void ) +{ +unsigned long pnum; +struct page *map; + +for (pnum =0 ; pnum <NR_MEM_SECTIONS ; pnum++) { +if (!valid_section_nr (pnum)) +continue ; + + map =sparse_early_mem_map_alloc (pnum); +if (!map) +continue ; +sparse_init_one_section (__nr_to_section (pnum), pnum, map); + } +} --To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Signature · 8 lines
Yasunori Goto -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Yasunori Goto
I think this issue is fixed by move-three-functions-that-are-only-needed-for.patch in current -mm tree. Is it not enough?
That's possible, I hadn't checked -mm. This was simply against current git. If there's already a fix in -mm, then this can simply be ignored.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Yasunori Goto
Quoted 4 lines
I think this issue is fixed by move-three-functions-that-are-only-needed-for.patch in current -mm tree. Is it not enough?
That's possible, I hadn't checked -mm. This was simply against current git. If there's already a fix in -mm, then this can simply be ignored.
Okay. Thanks for your report.
Signature · 8 lines
Yasunori Goto -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>