[PATCH] memblock: fix memblock_bottom_up() and memblock_set_bottom_up() annotations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



memblock_bottom_up() and memblock_set_bottom_up() lack __meminitdata
annotations causing compiler warnings like:
  WARNING: modpost: vmlinux.o(.text+0x4111c4): Section mismatch in reference from the function memblock_bottom_up() to the
  variable .meminit.data:memblock

Fix it by adding the missing annotation and removing the wrong
__meminit annotation.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Roman Gushchin <roman.gushchin@xxxxxxxxx>
---
 include/linux/memblock.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 50ad19662a32..536bc2fc31e6 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -460,7 +460,7 @@ static inline void *memblock_alloc_node(phys_addr_t size,
 /*
  * Set the allocation direction to bottom-up or top-down.
  */
-static inline __init_memblock void memblock_set_bottom_up(bool enable)
+static inline __initdata_memblock void memblock_set_bottom_up(bool enable)
 {
 	memblock.bottom_up = enable;
 }
@@ -470,7 +470,7 @@ static inline __init_memblock void memblock_set_bottom_up(bool enable)
  * if this is true, that said, memblock will allocate memory
  * in bottom-up direction.
  */
-static inline __init_memblock bool memblock_bottom_up(void)
+static inline __initdata_memblock bool memblock_bottom_up(void)
 {
 	return memblock.bottom_up;
 }
-- 
2.30.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux