diff mbox series

[3/7] mm: make __absent_pages_in_range() as static

Message ID 20240326061134.1055295-4-bhe@redhat.com (mailing list archive)
State New
Headers show
Series mm/init: minor clean up and improvement | expand

Commit Message

Baoquan He March 26, 2024, 6:11 a.m. UTC
It's only called in mm/mm_init.c now.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 include/linux/mm.h | 2 --
 mm/mm_init.c       | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Mike Rapoport April 2, 2024, 8:29 a.m. UTC | #1
On Tue, Mar 26, 2024 at 02:11:29PM +0800, Baoquan He wrote:
> It's only called in mm/mm_init.c now.
> 
> Signed-off-by: Baoquan He <bhe@redhat.com>

Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>

> ---
>  include/linux/mm.h | 2 --
>  mm/mm_init.c       | 2 +-
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index ab1ba0a31429..74f71e802e0c 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -3193,8 +3193,6 @@ static inline unsigned long get_num_physpages(void)
>   */
>  void free_area_init(unsigned long *max_zone_pfn);
>  unsigned long node_map_pfn_alignment(void);
> -unsigned long __absent_pages_in_range(int nid, unsigned long start_pfn,
> -						unsigned long end_pfn);
>  extern unsigned long absent_pages_in_range(unsigned long start_pfn,
>  						unsigned long end_pfn);
>  extern void get_pfn_range_for_nid(unsigned int nid,
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index 99681ffb9091..cbdb49cdd2ce 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -1143,7 +1143,7 @@ static void __init adjust_zone_range_for_zone_movable(int nid,
>   * Return the number of holes in a range on a node. If nid is MAX_NUMNODES,
>   * then all holes in the requested range will be accounted for.
>   */
> -unsigned long __init __absent_pages_in_range(int nid,
> +static unsigned long __init __absent_pages_in_range(int nid,
>  				unsigned long range_start_pfn,
>  				unsigned long range_end_pfn)
>  {
>
> -- 
> 2.41.0
>
diff mbox series

Patch

diff --git a/include/linux/mm.h b/include/linux/mm.h
index ab1ba0a31429..74f71e802e0c 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -3193,8 +3193,6 @@  static inline unsigned long get_num_physpages(void)
  */
 void free_area_init(unsigned long *max_zone_pfn);
 unsigned long node_map_pfn_alignment(void);
-unsigned long __absent_pages_in_range(int nid, unsigned long start_pfn,
-						unsigned long end_pfn);
 extern unsigned long absent_pages_in_range(unsigned long start_pfn,
 						unsigned long end_pfn);
 extern void get_pfn_range_for_nid(unsigned int nid,
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 99681ffb9091..cbdb49cdd2ce 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -1143,7 +1143,7 @@  static void __init adjust_zone_range_for_zone_movable(int nid,
  * Return the number of holes in a range on a node. If nid is MAX_NUMNODES,
  * then all holes in the requested range will be accounted for.
  */
-unsigned long __init __absent_pages_in_range(int nid,
+static unsigned long __init __absent_pages_in_range(int nid,
 				unsigned long range_start_pfn,
 				unsigned long range_end_pfn)
 {