path: root/mm/memblock.c
diff options
authorRaghavendra D Prabhu <>2012-10-08 23:33:55 (GMT)
committerLinus Torvalds <>2012-10-09 07:23:01 (GMT)
commitc22331166b49b94b51424bb7fa1f83e09ad82734 (patch)
tree2244968e747d81e56d7ff64863074e97e092c09e /mm/memblock.c
parent3e648ebe076390018c317881d7d926f24d7bac6b (diff)
mm: avoid section mismatch warning for memblock_type_name
Following section mismatch warning is thrown during build; WARNING: vmlinux.o(.text+0x32408f): Section mismatch in reference from the function memblock_type_name() to the variable The function memblock_type_name() references the variable __meminitdata memblock. This is often because memblock_type_name lacks a __meminitdata annotation or the annotation of memblock is wrong. This is because memblock_type_name makes reference to memblock variable with attribute __meminitdata. Hence, the warning (even if the function is inline). [ remove inline] Signed-off-by: Raghavendra D Prabhu <> Cc: Tejun Heo <> Cc: Benjamin Herrenschmidt <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/memblock.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index d809f17..931eef1 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -41,7 +41,8 @@ static int memblock_memory_in_slab __initdata_memblock = 0;
static int memblock_reserved_in_slab __initdata_memblock = 0;
/* inline so we don't get a warning when pr_debug is compiled out */
-static inline const char *memblock_type_name(struct memblock_type *type)
+static __init_memblock const char *
+memblock_type_name(struct memblock_type *type)
if (type == &memblock.memory)
return "memory";