diff mbox series

mm/mmzone.h: remove unused macros

Message ID 20220127093210.62293-1-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series mm/mmzone.h: remove unused macros | expand

Commit Message

Miaohe Lin Jan. 27, 2022, 9:32 a.m. UTC
Remove pgdat_page_nr, nid_page_nr and NODE_MEM_MAP. They are unused now.

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

Comments

David Hildenbrand Jan. 27, 2022, 9:55 a.m. UTC | #1
On 27.01.22 10:32, Miaohe Lin wrote:
> Remove pgdat_page_nr, nid_page_nr and NODE_MEM_MAP. They are unused now.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>  include/linux/mmzone.h | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index aed44e9b5d89..6c004256d943 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -920,12 +920,6 @@ typedef struct pglist_data {
>  
>  #define node_present_pages(nid)	(NODE_DATA(nid)->node_present_pages)
>  #define node_spanned_pages(nid)	(NODE_DATA(nid)->node_spanned_pages)
> -#ifdef CONFIG_FLATMEM
> -#define pgdat_page_nr(pgdat, pagenr)	((pgdat)->node_mem_map + (pagenr))
> -#else
> -#define pgdat_page_nr(pgdat, pagenr)	pfn_to_page((pgdat)->node_start_pfn + (pagenr))
> -#endif
> -#define nid_page_nr(nid, pagenr) 	pgdat_page_nr(NODE_DATA(nid),(pagenr))
>  
>  #define node_start_pfn(nid)	(NODE_DATA(nid)->node_start_pfn)
>  #define node_end_pfn(nid) pgdat_end_pfn(NODE_DATA(nid))
> @@ -1101,7 +1095,6 @@ static inline struct pglist_data *NODE_DATA(int nid)
>  {
>  	return &contig_page_data;
>  }
> -#define NODE_MEM_MAP(nid)	mem_map
>  
>  #else /* CONFIG_NUMA */
>  

Reviewed-by: David Hildenbrand <david@redhat.com>
Mike Rapoport Jan. 27, 2022, 12:44 p.m. UTC | #2
On Thu, Jan 27, 2022 at 05:32:10PM +0800, Miaohe Lin wrote:
> Remove pgdat_page_nr, nid_page_nr and NODE_MEM_MAP. They are unused now.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>

> ---
>  include/linux/mmzone.h | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index aed44e9b5d89..6c004256d943 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -920,12 +920,6 @@ typedef struct pglist_data {
>  
>  #define node_present_pages(nid)	(NODE_DATA(nid)->node_present_pages)
>  #define node_spanned_pages(nid)	(NODE_DATA(nid)->node_spanned_pages)
> -#ifdef CONFIG_FLATMEM
> -#define pgdat_page_nr(pgdat, pagenr)	((pgdat)->node_mem_map + (pagenr))
> -#else
> -#define pgdat_page_nr(pgdat, pagenr)	pfn_to_page((pgdat)->node_start_pfn + (pagenr))
> -#endif
> -#define nid_page_nr(nid, pagenr) 	pgdat_page_nr(NODE_DATA(nid),(pagenr))
>  
>  #define node_start_pfn(nid)	(NODE_DATA(nid)->node_start_pfn)
>  #define node_end_pfn(nid) pgdat_end_pfn(NODE_DATA(nid))
> @@ -1101,7 +1095,6 @@ static inline struct pglist_data *NODE_DATA(int nid)
>  {
>  	return &contig_page_data;
>  }
> -#define NODE_MEM_MAP(nid)	mem_map
>  
>  #else /* CONFIG_NUMA */
>  
> -- 
> 2.23.0
> 
>
diff mbox series

Patch

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index aed44e9b5d89..6c004256d943 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -920,12 +920,6 @@  typedef struct pglist_data {
 
 #define node_present_pages(nid)	(NODE_DATA(nid)->node_present_pages)
 #define node_spanned_pages(nid)	(NODE_DATA(nid)->node_spanned_pages)
-#ifdef CONFIG_FLATMEM
-#define pgdat_page_nr(pgdat, pagenr)	((pgdat)->node_mem_map + (pagenr))
-#else
-#define pgdat_page_nr(pgdat, pagenr)	pfn_to_page((pgdat)->node_start_pfn + (pagenr))
-#endif
-#define nid_page_nr(nid, pagenr) 	pgdat_page_nr(NODE_DATA(nid),(pagenr))
 
 #define node_start_pfn(nid)	(NODE_DATA(nid)->node_start_pfn)
 #define node_end_pfn(nid) pgdat_end_pfn(NODE_DATA(nid))
@@ -1101,7 +1095,6 @@  static inline struct pglist_data *NODE_DATA(int nid)
 {
 	return &contig_page_data;
 }
-#define NODE_MEM_MAP(nid)	mem_map
 
 #else /* CONFIG_NUMA */