Skip to contentSkip to conversation

mm/memory_hotplug: move definitions of {set,clear}_zone_contiguous

PATCH In review Ben Dooks (Codethink) 3 participants 3 messages Nov 6, 2019 – Nov 7, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/memory_hotplug: move definitions of {set,clear}_zone_contiguous

The {set,clear}_zone_contiguous are built whatever the configuraiton so move the definitions outside the current ifdef to avoid the following compiler warnings:

mm/page_alloc.c:1550:6: warning: no previous prototype for âset_zone_contiguousâ [-Wmissing-prototypes] mm/page_alloc.c:1571:6: warning: no previous prototype for âclear_zone_contiguousâ [-Wmissing-prototypes]

---
Cc: Andrew Morton <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 include/linux/memory_hotplug.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/memory_hotplug.h +3 -3
index f46ea71b4ffd..6a6456040802 100644
@@ -229,9 +229,6 @@ void put_online_mems(void);
 void mem_hotplug_begin(void);
 void mem_hotplug_done(void);
 
-extern void set_zone_contiguous(struct zone *zone);
-extern void clear_zone_contiguous(struct zone *zone);
-
 #else /* ! CONFIG_MEMORY_HOTPLUG */
 #define pfn_to_online_page(pfn)			\
 ({						\
@@ -339,6 +336,9 @@ static inline int remove_memory(int nid, u64 start, u64 size)
 static inline void __remove_memory(int nid, u64 start, u64 size) {}
 #endif /* CONFIG_MEMORY_HOTREMOVE */
 
+extern void set_zone_contiguous(struct zone *zone);
+extern void clear_zone_contiguous(struct zone *zone);
+
 extern void __ref free_area_init_core_hotplug(int nid);
 extern int __add_memory(int nid, u64 start, u64 size);
 extern int add_memory(int nid, u64 start, u64 size);
Signature · 1 line
2.24.0.rc1
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Ben Dooks (Codethink)

The {set,clear}_zone_contiguous are built whatever the configuraiton so move the definitions outside the current ifdef to avoid the following compiler warnings:

mm/page_alloc.c:1550:6: warning: no previous prototype for âset_zone_contiguousâ [-Wmissing-prototypes] mm/page_alloc.c:1571:6: warning: no previous prototype for âclear_zone_contiguousâ [-Wmissing-prototypes]

Quoted 35 lines

---
Cc: Andrew Morton <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 include/linux/memory_hotplug.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/memory_hotplug.h +3 -3
index f46ea71b4ffd..6a6456040802 100644
@@ -229,9 +229,6 @@ void put_online_mems(void);
 void mem_hotplug_begin(void);
 void mem_hotplug_done(void);
 
-extern void set_zone_contiguous(struct zone *zone);
-extern void clear_zone_contiguous(struct zone *zone);
-
 #else /* ! CONFIG_MEMORY_HOTPLUG */
 #define pfn_to_online_page(pfn)			\
 ({						\
@@ -339,6 +336,9 @@ static inline int remove_memory(int nid, u64 start, u64 size)
 static inline void __remove_memory(int nid, u64 start, u64 size) {}
 #endif /* CONFIG_MEMORY_HOTREMOVE */
 
+extern void set_zone_contiguous(struct zone *zone);
+extern void clear_zone_contiguous(struct zone *zone);
+
 extern void __ref free_area_init_core_hotplug(int nid);
 extern int __add_memory(int nid, u64 start, u64 size);
 extern int add_memory(int nid, u64 start, u64 size);
Signature · 1 line
2.24.0.rc1
Signature · 2 lines
Michal Hocko
SUSE Labs
Reviewed-by on v1 1/1
#2 lore raw
In reply to Ben Dooks (Codethink)
Quoted 33 lines · Ben Dooks (Codethink)

The {set,clear}_zone_contiguous are built whatever the configuraiton so move the definitions outside the current ifdef to avoid the following compiler warnings:

mm/page_alloc.c:1550:6: warning: no previous prototype for âset_zone_contiguousâ [-Wmissing-prototypes] mm/page_alloc.c:1571:6: warning: no previous prototype for âclear_zone_contiguousâ [-Wmissing-prototypes]

---
Cc: Andrew Morton <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
  include/linux/memory_hotplug.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/memory_hotplug.h +0 -3
index f46ea71b4ffd..6a6456040802 100644
@@ -229,9 +229,6 @@ void put_online_mems(void);
  void mem_hotplug_begin(void);
  void mem_hotplug_done(void);
 
-extern void set_zone_contiguous(struct zone *zone);
-extern void clear_zone_contiguous(struct zone *zone);
-
  #else /* ! CONFIG_MEMORY_HOTPLUG */
  #define pfn_to_online_page(pfn)			\
  ({						\

include/linux/memory_hotplug.h static inline int remove_memory(int nid, u64 start, u64 size) · line 344

Quoted 9 lines
include/linux/memory_hotplug.h +3 -0
@@ -339,6 +336,9 @@ static inline int remove_memory(int nid, u64 start, u64 size)
  static inline void __remove_memory(int nid, u64 start, u64 size) {}
  #endif /* CONFIG_MEMORY_HOTREMOVE */
 
+extern void set_zone_contiguous(struct zone *zone);
+extern void clear_zone_contiguous(struct zone *zone);
+
  extern void __ref free_area_init_core_hotplug(int nid);
  extern int __add_memory(int nid, u64 start, u64 size);
  extern int add_memory(int nid, u64 start, u64 size);
Signature · 3 lines
Thanks,

David / dhildenb