linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/page_ext: remove unused variable in offline_page_ext
@ 2022-08-01  5:06 Charan Teja Kalla
  2022-08-01  5:28 ` Pavan Kondeti
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Charan Teja Kalla @ 2022-08-01  5:06 UTC (permalink / raw)
  To: akpm, david, mhocko, quic_pkondeti
  Cc: linux-mm, linux-kernel, Charan Teja Kalla

Remove unused variable 'nid' in offline_page_ext(). This is not used
since the page_ext code inception.

Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
---
 mm/page_ext.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/page_ext.c b/mm/page_ext.c
index 3dc715d..e22a928 100644
--- a/mm/page_ext.c
+++ b/mm/page_ext.c
@@ -336,7 +336,7 @@ static int __meminit online_page_ext(unsigned long start_pfn,
 }
 
 static int __meminit offline_page_ext(unsigned long start_pfn,
-				unsigned long nr_pages, int nid)
+				unsigned long nr_pages)
 {
 	unsigned long start, end, pfn;
 
@@ -362,11 +362,11 @@ static int __meminit page_ext_callback(struct notifier_block *self,
 		break;
 	case MEM_OFFLINE:
 		offline_page_ext(mn->start_pfn,
-				mn->nr_pages, mn->status_change_nid);
+				mn->nr_pages);
 		break;
 	case MEM_CANCEL_ONLINE:
 		offline_page_ext(mn->start_pfn,
-				mn->nr_pages, mn->status_change_nid);
+				mn->nr_pages);
 		break;
 	case MEM_GOING_OFFLINE:
 		break;
-- 
2.7.4


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

* Re: [PATCH] mm/page_ext: remove unused variable in offline_page_ext
  2022-08-01  5:06 [PATCH] mm/page_ext: remove unused variable in offline_page_ext Charan Teja Kalla
@ 2022-08-01  5:28 ` Pavan Kondeti
  2022-08-01 11:37   ` Charan Teja Kalla
  2022-08-01  8:47 ` Michal Hocko
  2022-08-01  9:07 ` Anshuman Khandual
  2 siblings, 1 reply; 5+ messages in thread
From: Pavan Kondeti @ 2022-08-01  5:28 UTC (permalink / raw)
  To: Charan Teja Kalla
  Cc: akpm, david, mhocko, quic_pkondeti, linux-mm, linux-kernel

On Mon, Aug 01, 2022 at 10:36:37AM +0530, Charan Teja Kalla wrote:
> Remove unused variable 'nid' in offline_page_ext(). This is not used
> since the page_ext code inception.
> 

Just to be clear, should we say "drop nid argument from offline_page_exit"?
With this change the symmetry between "online_page_exit" and "offline_page_exit"
is lost. But that is not a valid point to keep an unused argument.

> Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
> ---
>  mm/page_ext.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/page_ext.c b/mm/page_ext.c
> index 3dc715d..e22a928 100644
> --- a/mm/page_ext.c
> +++ b/mm/page_ext.c
> @@ -336,7 +336,7 @@ static int __meminit online_page_ext(unsigned long start_pfn,
>  }
>  
>  static int __meminit offline_page_ext(unsigned long start_pfn,
> -				unsigned long nr_pages, int nid)
> +				unsigned long nr_pages)
>  {
>  	unsigned long start, end, pfn;
>  
> @@ -362,11 +362,11 @@ static int __meminit page_ext_callback(struct notifier_block *self,
>  		break;
>  	case MEM_OFFLINE:
>  		offline_page_ext(mn->start_pfn,
> -				mn->nr_pages, mn->status_change_nid);
> +				mn->nr_pages);
>  		break;
>  	case MEM_CANCEL_ONLINE:
>  		offline_page_ext(mn->start_pfn,
> -				mn->nr_pages, mn->status_change_nid);
> +				mn->nr_pages);
>  		break;
>  	case MEM_GOING_OFFLINE:
>  		break;

Looks good to me.

Thanks,
Pavan

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

* Re: [PATCH] mm/page_ext: remove unused variable in offline_page_ext
  2022-08-01  5:06 [PATCH] mm/page_ext: remove unused variable in offline_page_ext Charan Teja Kalla
  2022-08-01  5:28 ` Pavan Kondeti
@ 2022-08-01  8:47 ` Michal Hocko
  2022-08-01  9:07 ` Anshuman Khandual
  2 siblings, 0 replies; 5+ messages in thread
From: Michal Hocko @ 2022-08-01  8:47 UTC (permalink / raw)
  To: Charan Teja Kalla; +Cc: akpm, david, quic_pkondeti, linux-mm, linux-kernel

On Mon 01-08-22 10:36:37, Charan Teja Kalla wrote:
> Remove unused variable 'nid' in offline_page_ext(). This is not used
> since the page_ext code inception.
> 
> Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>

Acked-by: Michal Hocko <mhocko@suse.com>
Thanks

> ---
>  mm/page_ext.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/page_ext.c b/mm/page_ext.c
> index 3dc715d..e22a928 100644
> --- a/mm/page_ext.c
> +++ b/mm/page_ext.c
> @@ -336,7 +336,7 @@ static int __meminit online_page_ext(unsigned long start_pfn,
>  }
>  
>  static int __meminit offline_page_ext(unsigned long start_pfn,
> -				unsigned long nr_pages, int nid)
> +				unsigned long nr_pages)
>  {
>  	unsigned long start, end, pfn;
>  
> @@ -362,11 +362,11 @@ static int __meminit page_ext_callback(struct notifier_block *self,
>  		break;
>  	case MEM_OFFLINE:
>  		offline_page_ext(mn->start_pfn,
> -				mn->nr_pages, mn->status_change_nid);
> +				mn->nr_pages);
>  		break;
>  	case MEM_CANCEL_ONLINE:
>  		offline_page_ext(mn->start_pfn,
> -				mn->nr_pages, mn->status_change_nid);
> +				mn->nr_pages);
>  		break;
>  	case MEM_GOING_OFFLINE:
>  		break;
> -- 
> 2.7.4

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH] mm/page_ext: remove unused variable in offline_page_ext
  2022-08-01  5:06 [PATCH] mm/page_ext: remove unused variable in offline_page_ext Charan Teja Kalla
  2022-08-01  5:28 ` Pavan Kondeti
  2022-08-01  8:47 ` Michal Hocko
@ 2022-08-01  9:07 ` Anshuman Khandual
  2 siblings, 0 replies; 5+ messages in thread
From: Anshuman Khandual @ 2022-08-01  9:07 UTC (permalink / raw)
  To: Charan Teja Kalla, akpm, david, mhocko, quic_pkondeti
  Cc: linux-mm, linux-kernel



On 8/1/22 10:36, Charan Teja Kalla wrote:
> Remove unused variable 'nid' in offline_page_ext(). This is not used
> since the page_ext code inception.
> 
> Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>

LGTM

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

> ---
>  mm/page_ext.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/page_ext.c b/mm/page_ext.c
> index 3dc715d..e22a928 100644
> --- a/mm/page_ext.c
> +++ b/mm/page_ext.c
> @@ -336,7 +336,7 @@ static int __meminit online_page_ext(unsigned long start_pfn,
>  }
>  
>  static int __meminit offline_page_ext(unsigned long start_pfn,
> -				unsigned long nr_pages, int nid)
> +				unsigned long nr_pages)
>  {
>  	unsigned long start, end, pfn;
>  
> @@ -362,11 +362,11 @@ static int __meminit page_ext_callback(struct notifier_block *self,
>  		break;
>  	case MEM_OFFLINE:
>  		offline_page_ext(mn->start_pfn,
> -				mn->nr_pages, mn->status_change_nid);
> +				mn->nr_pages);
>  		break;
>  	case MEM_CANCEL_ONLINE:
>  		offline_page_ext(mn->start_pfn,
> -				mn->nr_pages, mn->status_change_nid);
> +				mn->nr_pages);
>  		break;
>  	case MEM_GOING_OFFLINE:
>  		break;

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

* Re: [PATCH] mm/page_ext: remove unused variable in offline_page_ext
  2022-08-01  5:28 ` Pavan Kondeti
@ 2022-08-01 11:37   ` Charan Teja Kalla
  0 siblings, 0 replies; 5+ messages in thread
From: Charan Teja Kalla @ 2022-08-01 11:37 UTC (permalink / raw)
  To: Pavan Kondeti; +Cc: akpm, david, mhocko, linux-mm, linux-kernel

Thanks Pavan for the comments!!

On 8/1/2022 10:58 AM, Pavan Kondeti wrote:
> On Mon, Aug 01, 2022 at 10:36:37AM +0530, Charan Teja Kalla wrote:
>> Remove unused variable 'nid' in offline_page_ext(). This is not used
>> since the page_ext code inception.
>>
> Just to be clear, should we say "drop nid argument from offline_page_exit"?
IIUC, drop is something we use if it ever considered to use earlier.
Remove is when we are completely getting rid of it.

Anyway, since it is just terminology and there are already some tags on
this change, I will let Andrew to take the decision and if he decides,
will give V2 with changing the commit message and collect all the tags.

Thanks,
Charan

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

end of thread, other threads:[~2022-08-01 11:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-01  5:06 [PATCH] mm/page_ext: remove unused variable in offline_page_ext Charan Teja Kalla
2022-08-01  5:28 ` Pavan Kondeti
2022-08-01 11:37   ` Charan Teja Kalla
2022-08-01  8:47 ` Michal Hocko
2022-08-01  9:07 ` Anshuman Khandual

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