linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/memory_hotplug: move definitions of {set,clear}_zone_contiguous
@ 2019-11-06 12:39 Ben Dooks (Codethink)
  2019-11-06 15:23 ` Michal Hocko
  2019-11-07 22:47 ` David Hildenbrand
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Dooks (Codethink) @ 2019-11-06 12:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Dooks (Codethink),
	Andrew Morton, David Hildenbrand, linux-mm, linux-kernel

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]

Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
---
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
 include/linux/memory_hotplug.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index f46ea71b4ffd..6a6456040802 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -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);
-- 
2.24.0.rc1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/memory_hotplug: move definitions of {set,clear}_zone_contiguous
  2019-11-06 12:39 [PATCH] mm/memory_hotplug: move definitions of {set,clear}_zone_contiguous Ben Dooks (Codethink)
@ 2019-11-06 15:23 ` Michal Hocko
  2019-11-07 22:47 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2019-11-06 15:23 UTC (permalink / raw)
  To: Ben Dooks (Codethink)
  Cc: linux-kernel, Andrew Morton, David Hildenbrand, linux-mm, linux-kernel

On Wed 06-11-19 12:39:11, Ben Dooks (Codethink) wrote:
> 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]
> 
> Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  include/linux/memory_hotplug.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index f46ea71b4ffd..6a6456040802 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -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);
> -- 
> 2.24.0.rc1

-- 
Michal Hocko
SUSE Labs


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm/memory_hotplug: move definitions of {set,clear}_zone_contiguous
  2019-11-06 12:39 [PATCH] mm/memory_hotplug: move definitions of {set,clear}_zone_contiguous Ben Dooks (Codethink)
  2019-11-06 15:23 ` Michal Hocko
@ 2019-11-07 22:47 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2019-11-07 22:47 UTC (permalink / raw)
  To: Ben Dooks (Codethink), linux-kernel; +Cc: Andrew Morton, linux-mm, linux-kernel

On 06.11.19 13:39, Ben Dooks (Codethink) wrote:
> 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]
> 
> Signed-off-by: Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>
> ---
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> ---
>   include/linux/memory_hotplug.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index f46ea71b4ffd..6a6456040802 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -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);
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-07 22:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 12:39 [PATCH] mm/memory_hotplug: move definitions of {set,clear}_zone_contiguous Ben Dooks (Codethink)
2019-11-06 15:23 ` Michal Hocko
2019-11-07 22:47 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).