Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1302248

[PATCH] include/linux/memblock.h: Use __init_memblock for movable_node_is_enabled

From chengang@emindsoft.com.cn
Newsgroups linux.kernel
Subject [PATCH] include/linux/memblock.h: Use __init_memblock for movable_node_is_enabled
Date 2016-01-05 23:30 +0100
Message-ID <qNIh4-FU-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Chen Gang <chengang@emindsoft.com.cn>

The related warning:

    LD      mm/built-in.o
  WARNING: mm/built-in.o(.text.unlikely+0x155d): Section mismatch in reference from the function movable_node_is_enabled() to the variable .meminit.data:movable_node_enabled
  The function movable_node_is_enabled() references
  the variable __meminitdata movable_node_enabled.
  This is often because movable_node_is_enabled lacks a __meminitdata
  annotation or the annotation of movable_node_enabled is wrong.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 include/linux/memblock.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 173fb44..976ac58 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -160,13 +160,21 @@ void __next_reserved_mem_region(u64 *idx, phys_addr_t *out_start,
 	     i != (u64)ULLONG_MAX;					\
 	     __next_reserved_mem_region(&i, p_start, p_end))
 
+#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
+#define __init_memblock __meminit
+#define __initdata_memblock __meminitdata
+#else
+#define __init_memblock
+#define __initdata_memblock
+#endif
+
 #ifdef CONFIG_MOVABLE_NODE
 static inline bool memblock_is_hotpluggable(struct memblock_region *m)
 {
 	return m->flags & MEMBLOCK_HOTPLUG;
 }
 
-static inline bool movable_node_is_enabled(void)
+static inline bool __init_memblock movable_node_is_enabled(void)
 {
 	return movable_node_enabled;
 }
@@ -405,14 +413,6 @@ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblo
 	for (idx = 0; idx < memblock_type->cnt;				\
 	     idx++,rgn = &memblock_type->regions[idx])
 
-#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
-#define __init_memblock __meminit
-#define __initdata_memblock __meminitdata
-#else
-#define __init_memblock
-#define __initdata_memblock
-#endif
-
 #ifdef CONFIG_MEMTEST
 extern void early_memtest(phys_addr_t start, phys_addr_t end);
 #else
-- 
1.9.3

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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] include/linux/memblock.h: Use __init_memblock for movable_node_is_enabled chengang@emindsoft.com.cn - 2016-01-05 23:30 +0100
  Re: [PATCH] include/linux/memblock.h: Use __init_memblock for  movable_node_is_enabled Andrew Morton <akpm@linux-foundation.org> - 2016-01-05 23:40 +0100
    Re: [PATCH] include/linux/memblock.h: Use __init_memblock for  movable_node_is_enabled Chen Gang <chengang@emindsoft.com.cn> - 2016-01-06 02:00 +0100

csiph-web