diff mbox series

[10/16] mm, memory_hotplug: remove obsolete generic_free_nodedata()

Message ID 20220909092451.24883-11-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series A few cleanup patches for mm | expand

Commit Message

Miaohe Lin Sept. 9, 2022, 9:24 a.m. UTC
Commit 390511e1476e ("mm, memory_hotplug: drop arch_free_nodedata")
drops the last caller of generic_free_nodedata(). Remove it too.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 include/linux/memory_hotplug.h | 8 --------
 1 file changed, 8 deletions(-)

Comments

David Hildenbrand Sept. 9, 2022, 11:32 a.m. UTC | #1
On 09.09.22 11:24, Miaohe Lin wrote:
> Commit 390511e1476e ("mm, memory_hotplug: drop arch_free_nodedata")
> drops the last caller of generic_free_nodedata(). Remove it too.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>   include/linux/memory_hotplug.h | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index 51052969dbfe..9fcbf5706595 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -43,11 +43,6 @@ extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat);
>   ({								\
>   	memblock_alloc(sizeof(*pgdat), SMP_CACHE_BYTES);	\
>   })
> -/*
> - * This definition is just for error path in node hotadd.
> - * For node hotremove, we have to replace this.
> - */
> -#define generic_free_nodedata(pgdat)	kfree(pgdat)
>   
>   extern pg_data_t *node_data[];
>   static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
> @@ -63,9 +58,6 @@ static inline pg_data_t *generic_alloc_nodedata(int nid)
>   	BUG();
>   	return NULL;
>   }
> -static inline void generic_free_nodedata(pg_data_t *pgdat)
> -{
> -}
>   static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
>   {
>   }


Reviewed-by: David Hildenbrand <david@redhat.com>
Anshuman Khandual Sept. 13, 2022, 8:57 a.m. UTC | #2
On 9/9/22 14:54, Miaohe Lin wrote:
> Commit 390511e1476e ("mm, memory_hotplug: drop arch_free_nodedata")
> drops the last caller of generic_free_nodedata(). Remove it too.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

> ---
>  include/linux/memory_hotplug.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index 51052969dbfe..9fcbf5706595 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -43,11 +43,6 @@ extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat);
>  ({								\
>  	memblock_alloc(sizeof(*pgdat), SMP_CACHE_BYTES);	\
>  })
> -/*
> - * This definition is just for error path in node hotadd.
> - * For node hotremove, we have to replace this.
> - */
> -#define generic_free_nodedata(pgdat)	kfree(pgdat)
>  
>  extern pg_data_t *node_data[];
>  static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
> @@ -63,9 +58,6 @@ static inline pg_data_t *generic_alloc_nodedata(int nid)
>  	BUG();
>  	return NULL;
>  }
> -static inline void generic_free_nodedata(pg_data_t *pgdat)
> -{
> -}
>  static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
>  {
>  }
Oscar Salvador Sept. 15, 2022, 7:37 a.m. UTC | #3
On Fri, Sep 09, 2022 at 05:24:45PM +0800, Miaohe Lin wrote:
> Commit 390511e1476e ("mm, memory_hotplug: drop arch_free_nodedata")
> drops the last caller of generic_free_nodedata(). Remove it too.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Reviewed-by: Oscar Salvador <osalvador@suse.de>

> ---
>  include/linux/memory_hotplug.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
> index 51052969dbfe..9fcbf5706595 100644
> --- a/include/linux/memory_hotplug.h
> +++ b/include/linux/memory_hotplug.h
> @@ -43,11 +43,6 @@ extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat);
>  ({								\
>  	memblock_alloc(sizeof(*pgdat), SMP_CACHE_BYTES);	\
>  })
> -/*
> - * This definition is just for error path in node hotadd.
> - * For node hotremove, we have to replace this.
> - */
> -#define generic_free_nodedata(pgdat)	kfree(pgdat)
>  
>  extern pg_data_t *node_data[];
>  static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
> @@ -63,9 +58,6 @@ static inline pg_data_t *generic_alloc_nodedata(int nid)
>  	BUG();
>  	return NULL;
>  }
> -static inline void generic_free_nodedata(pg_data_t *pgdat)
> -{
> -}
>  static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
>  {
>  }
> -- 
> 2.23.0
>
diff mbox series

Patch

diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 51052969dbfe..9fcbf5706595 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -43,11 +43,6 @@  extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat);
 ({								\
 	memblock_alloc(sizeof(*pgdat), SMP_CACHE_BYTES);	\
 })
-/*
- * This definition is just for error path in node hotadd.
- * For node hotremove, we have to replace this.
- */
-#define generic_free_nodedata(pgdat)	kfree(pgdat)
 
 extern pg_data_t *node_data[];
 static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
@@ -63,9 +58,6 @@  static inline pg_data_t *generic_alloc_nodedata(int nid)
 	BUG();
 	return NULL;
 }
-static inline void generic_free_nodedata(pg_data_t *pgdat)
-{
-}
 static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat)
 {
 }