linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable()
@ 2023-07-17  6:58 Haifeng Xu
  2023-07-17 10:18 ` David Hildenbrand
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Haifeng Xu @ 2023-07-17  6:58 UTC (permalink / raw)
  To: rppt; +Cc: akpm, linux-mm, linux-kernel, Haifeng Xu

node_start_pfn is not used in adjust_zone_range_for_zone_movable(), so
it is pointless to waste a function argument. Drop the parameter.

Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
---
 mm/mm_init.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/mm_init.c b/mm/mm_init.c
index a313d1828a6c..23d50541e1f7 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -1105,7 +1105,6 @@ void __ref memmap_init_zone_device(struct zone *zone,
  */
 static void __init adjust_zone_range_for_zone_movable(int nid,
 					unsigned long zone_type,
-					unsigned long node_start_pfn,
 					unsigned long node_end_pfn,
 					unsigned long *zone_start_pfn,
 					unsigned long *zone_end_pfn)
@@ -1222,9 +1221,8 @@ static unsigned long __init zone_spanned_pages_in_node(int nid,
 	/* Get the start and end of the zone */
 	*zone_start_pfn = clamp(node_start_pfn, zone_low, zone_high);
 	*zone_end_pfn = clamp(node_end_pfn, zone_low, zone_high);
-	adjust_zone_range_for_zone_movable(nid, zone_type,
-				node_start_pfn, node_end_pfn,
-				zone_start_pfn, zone_end_pfn);
+	adjust_zone_range_for_zone_movable(nid, zone_type, node_end_pfn,
+					   zone_start_pfn, zone_end_pfn);
 
 	/* Check that this node has pages within the zone's required range */
 	if (*zone_end_pfn < node_start_pfn || *zone_start_pfn > node_end_pfn)
-- 
2.25.1



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

* Re: [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable()
  2023-07-17  6:58 [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable() Haifeng Xu
@ 2023-07-17 10:18 ` David Hildenbrand
  2023-07-17 11:41 ` Mike Rapoport
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: David Hildenbrand @ 2023-07-17 10:18 UTC (permalink / raw)
  To: Haifeng Xu, rppt; +Cc: akpm, linux-mm, linux-kernel

On 17.07.23 08:58, Haifeng Xu wrote:
> node_start_pfn is not used in adjust_zone_range_for_zone_movable(), so
> it is pointless to waste a function argument. Drop the parameter.
> 
> Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
> ---

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

-- 
Cheers,

David / dhildenb



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

* Re: [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable()
  2023-07-17  6:58 [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable() Haifeng Xu
  2023-07-17 10:18 ` David Hildenbrand
@ 2023-07-17 11:41 ` Mike Rapoport
  2023-07-19  4:32 ` Mike Rapoport
  2023-07-19  7:48 ` Anshuman Khandual
  3 siblings, 0 replies; 5+ messages in thread
From: Mike Rapoport @ 2023-07-17 11:41 UTC (permalink / raw)
  To: Haifeng Xu; +Cc: akpm, linux-mm, linux-kernel

On Mon, Jul 17, 2023 at 06:58:11AM +0000, Haifeng Xu wrote:
> node_start_pfn is not used in adjust_zone_range_for_zone_movable(), so
> it is pointless to waste a function argument. Drop the parameter.
> 
> Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>

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

> ---
>  mm/mm_init.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index a313d1828a6c..23d50541e1f7 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -1105,7 +1105,6 @@ void __ref memmap_init_zone_device(struct zone *zone,
>   */
>  static void __init adjust_zone_range_for_zone_movable(int nid,
>  					unsigned long zone_type,
> -					unsigned long node_start_pfn,
>  					unsigned long node_end_pfn,
>  					unsigned long *zone_start_pfn,
>  					unsigned long *zone_end_pfn)
> @@ -1222,9 +1221,8 @@ static unsigned long __init zone_spanned_pages_in_node(int nid,
>  	/* Get the start and end of the zone */
>  	*zone_start_pfn = clamp(node_start_pfn, zone_low, zone_high);
>  	*zone_end_pfn = clamp(node_end_pfn, zone_low, zone_high);
> -	adjust_zone_range_for_zone_movable(nid, zone_type,
> -				node_start_pfn, node_end_pfn,
> -				zone_start_pfn, zone_end_pfn);
> +	adjust_zone_range_for_zone_movable(nid, zone_type, node_end_pfn,
> +					   zone_start_pfn, zone_end_pfn);
>  
>  	/* Check that this node has pages within the zone's required range */
>  	if (*zone_end_pfn < node_start_pfn || *zone_start_pfn > node_end_pfn)
> -- 
> 2.25.1
> 

-- 
Sincerely yours,
Mike.


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

* Re: [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable()
  2023-07-17  6:58 [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable() Haifeng Xu
  2023-07-17 10:18 ` David Hildenbrand
  2023-07-17 11:41 ` Mike Rapoport
@ 2023-07-19  4:32 ` Mike Rapoport
  2023-07-19  7:48 ` Anshuman Khandual
  3 siblings, 0 replies; 5+ messages in thread
From: Mike Rapoport @ 2023-07-19  4:32 UTC (permalink / raw)
  To: Haifeng Xu; +Cc: akpm, linux-mm, linux-kernel

On Mon, Jul 17, 2023 at 06:58:11AM +0000, Haifeng Xu wrote:
> node_start_pfn is not used in adjust_zone_range_for_zone_movable(), so
> it is pointless to waste a function argument. Drop the parameter.
> 
> Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>

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

> ---
>  mm/mm_init.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index a313d1828a6c..23d50541e1f7 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -1105,7 +1105,6 @@ void __ref memmap_init_zone_device(struct zone *zone,
>   */
>  static void __init adjust_zone_range_for_zone_movable(int nid,
>  					unsigned long zone_type,
> -					unsigned long node_start_pfn,
>  					unsigned long node_end_pfn,
>  					unsigned long *zone_start_pfn,
>  					unsigned long *zone_end_pfn)
> @@ -1222,9 +1221,8 @@ static unsigned long __init zone_spanned_pages_in_node(int nid,
>  	/* Get the start and end of the zone */
>  	*zone_start_pfn = clamp(node_start_pfn, zone_low, zone_high);
>  	*zone_end_pfn = clamp(node_end_pfn, zone_low, zone_high);
> -	adjust_zone_range_for_zone_movable(nid, zone_type,
> -				node_start_pfn, node_end_pfn,
> -				zone_start_pfn, zone_end_pfn);
> +	adjust_zone_range_for_zone_movable(nid, zone_type, node_end_pfn,
> +					   zone_start_pfn, zone_end_pfn);
>  
>  	/* Check that this node has pages within the zone's required range */
>  	if (*zone_end_pfn < node_start_pfn || *zone_start_pfn > node_end_pfn)
> -- 
> 2.25.1
> 

-- 
Sincerely yours,
Mike.


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

* Re: [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable()
  2023-07-17  6:58 [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable() Haifeng Xu
                   ` (2 preceding siblings ...)
  2023-07-19  4:32 ` Mike Rapoport
@ 2023-07-19  7:48 ` Anshuman Khandual
  3 siblings, 0 replies; 5+ messages in thread
From: Anshuman Khandual @ 2023-07-19  7:48 UTC (permalink / raw)
  To: Haifeng Xu, rppt; +Cc: akpm, linux-mm, linux-kernel



On 7/17/23 12:28, Haifeng Xu wrote:
> node_start_pfn is not used in adjust_zone_range_for_zone_movable(), so
> it is pointless to waste a function argument. Drop the parameter.
> 
> Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>

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

> ---
>  mm/mm_init.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index a313d1828a6c..23d50541e1f7 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -1105,7 +1105,6 @@ void __ref memmap_init_zone_device(struct zone *zone,
>   */
>  static void __init adjust_zone_range_for_zone_movable(int nid,
>  					unsigned long zone_type,
> -					unsigned long node_start_pfn,
>  					unsigned long node_end_pfn,
>  					unsigned long *zone_start_pfn,
>  					unsigned long *zone_end_pfn)
> @@ -1222,9 +1221,8 @@ static unsigned long __init zone_spanned_pages_in_node(int nid,
>  	/* Get the start and end of the zone */
>  	*zone_start_pfn = clamp(node_start_pfn, zone_low, zone_high);
>  	*zone_end_pfn = clamp(node_end_pfn, zone_low, zone_high);
> -	adjust_zone_range_for_zone_movable(nid, zone_type,
> -				node_start_pfn, node_end_pfn,
> -				zone_start_pfn, zone_end_pfn);
> +	adjust_zone_range_for_zone_movable(nid, zone_type, node_end_pfn,
> +					   zone_start_pfn, zone_end_pfn);
>  
>  	/* Check that this node has pages within the zone's required range */
>  	if (*zone_end_pfn < node_start_pfn || *zone_start_pfn > node_end_pfn)


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

end of thread, other threads:[~2023-07-19  7:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17  6:58 [PATCH] mm/mm_init.c: drop node_start_pfn from adjust_zone_range_for_zone_movable() Haifeng Xu
2023-07-17 10:18 ` David Hildenbrand
2023-07-17 11:41 ` Mike Rapoport
2023-07-19  4:32 ` Mike Rapoport
2023-07-19  7:48 ` Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox