[PATCH] mm: fix section mismatch warning in sparse.c



Fix following warning:
WARNING: mm/built-in.o(.text+0x22069): Section mismatch in reference from the function sparse_early_usemap_alloc() to the function .init.text:__alloc_bootmem_node()

static sparse_early_usemap_alloc() were used only by sparse_init()
and with sparse_init() annotated _init it is safe to
annotate sparse_early_usemap_alloc with __init too.

Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
Cc: Andy Whitcroft <apw@xxxxxxxxxxxx>
Cc: Mel Gorman <mel@xxxxxxxxx>
Cc: Christoph Lameter <clameter@xxxxxxx>
---
mm/sparse.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/sparse.c b/mm/sparse.c
index a2183cb..231c7b5 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -237,7 +237,7 @@ static unsigned long *__kmalloc_section_usemap(void)
}
#endif /* CONFIG_MEMORY_HOTPLUG */

-static unsigned long *sparse_early_usemap_alloc(unsigned long pnum)
+static unsigned long *__init sparse_early_usemap_alloc(unsigned long pnum)
{
unsigned long *usemap;
struct mem_section *ms = __nr_to_section(pnum);
--
1.5.4.rc3.14.g44397

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [tip:x86/urgent] x86: Fix false positive section mismatch warnings in the apic code
    ... Fix false positive section mismatch warnings in the apic code ... are non init functions, but these functions calls some init ... This warning seems to be valid. ... So the real fix is to: ...
    (Linux-Kernel)
  • [PATCH] cpu: do not annotate exported register_cpu_notifier()
    ... Fix following warning: ... Drop the annotation so the function is kept after init. ...
    (Linux-Kernel)
  • 2.6.8.1-mm2
    ... - Added the reiser4 filesystem. ... Build fix ... Folded into other pacjet writing patches ... kgdbL warning fix ...
    (Linux-Kernel)
  • 2.6.7-mm7
    ... - Added a big UML update. ... - Lots of warning fixes, ... MMIO support for this sound driver ... Fix a weird kallsyms problem on ppc32 ...
    (Linux-Kernel)
  • Re: Experience log off problems on Windows XP SP3
    ... application type warning like that: ... background mode that should clean old registry keys and may be unload ... Is that a sort of workaround to fix my issue or what else? ... Your understanding and assessment of UPHClean service is correct, ...
    (microsoft.public.windowsxp.help_and_support)