linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/sparse: make mminit_validate_memmodel_limits() static
@ 2022-01-27  9:32 Miaohe Lin
  2022-01-27 12:45 ` Mike Rapoport
  0 siblings, 1 reply; 2+ messages in thread
From: Miaohe Lin @ 2022-01-27  9:32 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, linmiaohe

It's only used in the sparse.c now. So we can make it static and further
clean up the relevant code.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/internal.h | 11 -----------
 mm/sparse.c   |  2 +-
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/mm/internal.h b/mm/internal.h
index 4c2d06a2f50b..927dfba5111f 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -572,17 +572,6 @@ static inline void mminit_verify_zonelist(void)
 }
 #endif /* CONFIG_DEBUG_MEMORY_INIT */
 
-/* mminit_validate_memmodel_limits is independent of CONFIG_DEBUG_MEMORY_INIT */
-#if defined(CONFIG_SPARSEMEM)
-extern void mminit_validate_memmodel_limits(unsigned long *start_pfn,
-				unsigned long *end_pfn);
-#else
-static inline void mminit_validate_memmodel_limits(unsigned long *start_pfn,
-				unsigned long *end_pfn)
-{
-}
-#endif /* CONFIG_SPARSEMEM */
-
 #define NODE_RECLAIM_NOSCAN	-2
 #define NODE_RECLAIM_FULL	-1
 #define NODE_RECLAIM_SOME	0
diff --git a/mm/sparse.c b/mm/sparse.c
index d21c6e5910d0..952f06d8f373 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -126,7 +126,7 @@ static inline int sparse_early_nid(struct mem_section *section)
 }
 
 /* Validate the physical addressing limitations of the model */
-void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn,
+static void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn,
 						unsigned long *end_pfn)
 {
 	unsigned long max_sparsemem_pfn = 1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT);
-- 
2.23.0



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

* Re: [PATCH] mm/sparse: make mminit_validate_memmodel_limits() static
  2022-01-27  9:32 [PATCH] mm/sparse: make mminit_validate_memmodel_limits() static Miaohe Lin
@ 2022-01-27 12:45 ` Mike Rapoport
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Rapoport @ 2022-01-27 12:45 UTC (permalink / raw)
  To: Miaohe Lin; +Cc: akpm, linux-mm, linux-kernel

On Thu, Jan 27, 2022 at 05:32:21PM +0800, Miaohe Lin wrote:
> It's only used in the sparse.c now. So we can make it static and further
> clean up the relevant code.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

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

> ---
>  mm/internal.h | 11 -----------
>  mm/sparse.c   |  2 +-
>  2 files changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/mm/internal.h b/mm/internal.h
> index 4c2d06a2f50b..927dfba5111f 100644
> --- a/mm/internal.h
> +++ b/mm/internal.h
> @@ -572,17 +572,6 @@ static inline void mminit_verify_zonelist(void)
>  }
>  #endif /* CONFIG_DEBUG_MEMORY_INIT */
>  
> -/* mminit_validate_memmodel_limits is independent of CONFIG_DEBUG_MEMORY_INIT */
> -#if defined(CONFIG_SPARSEMEM)
> -extern void mminit_validate_memmodel_limits(unsigned long *start_pfn,
> -				unsigned long *end_pfn);
> -#else
> -static inline void mminit_validate_memmodel_limits(unsigned long *start_pfn,
> -				unsigned long *end_pfn)
> -{
> -}
> -#endif /* CONFIG_SPARSEMEM */
> -
>  #define NODE_RECLAIM_NOSCAN	-2
>  #define NODE_RECLAIM_FULL	-1
>  #define NODE_RECLAIM_SOME	0
> diff --git a/mm/sparse.c b/mm/sparse.c
> index d21c6e5910d0..952f06d8f373 100644
> --- a/mm/sparse.c
> +++ b/mm/sparse.c
> @@ -126,7 +126,7 @@ static inline int sparse_early_nid(struct mem_section *section)
>  }
>  
>  /* Validate the physical addressing limitations of the model */
> -void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn,
> +static void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn,
>  						unsigned long *end_pfn)
>  {
>  	unsigned long max_sparsemem_pfn = 1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT);
> -- 
> 2.23.0
> 
> 

-- 
Sincerely yours,
Mike.


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

end of thread, other threads:[~2022-01-27 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27  9:32 [PATCH] mm/sparse: make mminit_validate_memmodel_limits() static Miaohe Lin
2022-01-27 12:45 ` Mike Rapoport

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).