linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/page_isolate: change the prototype of undo_isolate_page_range()
@ 2019-07-02 13:53 Pingfan Liu
  2019-07-02 14:02 ` Michal Hocko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pingfan Liu @ 2019-07-02 13:53 UTC (permalink / raw)
  To: linux-mm
  Cc: Pingfan Liu, Andrew Morton, Michal Hocko, Oscar Salvador,
	Qian Cai, Anshuman Khandual, linux-kernel

undo_isolate_page_range() never fails, so no need to return value.

Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Qian Cai <cai@lca.pw>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-kernel@vger.kernel.org
---
 include/linux/page-isolation.h | 2 +-
 mm/page_isolation.c            | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h
index 280ae96..1099c2f 100644
--- a/include/linux/page-isolation.h
+++ b/include/linux/page-isolation.h
@@ -50,7 +50,7 @@ start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
  * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE.
  * target range is [start_pfn, end_pfn)
  */
-int
+void
 undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
 			unsigned migratetype);
 
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index e3638a5..89c19c0 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -230,7 +230,7 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
 /*
  * Make isolated pages available again.
  */
-int undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
+void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
 			    unsigned migratetype)
 {
 	unsigned long pfn;
@@ -247,7 +247,6 @@ int undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
 			continue;
 		unset_migratetype_isolate(page, migratetype);
 	}
-	return 0;
 }
 /*
  * Test all pages in the range is free(means isolated) or not.
-- 
2.7.5


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

* Re: [PATCH] mm/page_isolate: change the prototype of undo_isolate_page_range()
  2019-07-02 13:53 [PATCH] mm/page_isolate: change the prototype of undo_isolate_page_range() Pingfan Liu
@ 2019-07-02 14:02 ` Michal Hocko
  2019-07-02 14:23 ` Oscar Salvador
  2019-07-03  6:57 ` Anshuman Khandual
  2 siblings, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2019-07-02 14:02 UTC (permalink / raw)
  To: Pingfan Liu
  Cc: linux-mm, Andrew Morton, Oscar Salvador, Qian Cai,
	Anshuman Khandual, linux-kernel

On Tue 02-07-19 21:53:24, Pingfan Liu wrote:
> undo_isolate_page_range() never fails, so no need to return value.
> 
> Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Oscar Salvador <osalvador@suse.de>
> Cc: Qian Cai <cai@lca.pw>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: linux-kernel@vger.kernel.org

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

> ---
>  include/linux/page-isolation.h | 2 +-
>  mm/page_isolation.c            | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h
> index 280ae96..1099c2f 100644
> --- a/include/linux/page-isolation.h
> +++ b/include/linux/page-isolation.h
> @@ -50,7 +50,7 @@ start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
>   * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE.
>   * target range is [start_pfn, end_pfn)
>   */
> -int
> +void
>  undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
>  			unsigned migratetype);
>  
> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
> index e3638a5..89c19c0 100644
> --- a/mm/page_isolation.c
> +++ b/mm/page_isolation.c
> @@ -230,7 +230,7 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
>  /*
>   * Make isolated pages available again.
>   */
> -int undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
> +void undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
>  			    unsigned migratetype)
>  {
>  	unsigned long pfn;
> @@ -247,7 +247,6 @@ int undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
>  			continue;
>  		unset_migratetype_isolate(page, migratetype);
>  	}
> -	return 0;
>  }
>  /*
>   * Test all pages in the range is free(means isolated) or not.
> -- 
> 2.7.5

-- 
Michal Hocko
SUSE Labs

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

* Re: [PATCH] mm/page_isolate: change the prototype of undo_isolate_page_range()
  2019-07-02 13:53 [PATCH] mm/page_isolate: change the prototype of undo_isolate_page_range() Pingfan Liu
  2019-07-02 14:02 ` Michal Hocko
@ 2019-07-02 14:23 ` Oscar Salvador
  2019-07-03  6:57 ` Anshuman Khandual
  2 siblings, 0 replies; 4+ messages in thread
From: Oscar Salvador @ 2019-07-02 14:23 UTC (permalink / raw)
  To: Pingfan Liu
  Cc: linux-mm, Andrew Morton, Michal Hocko, Qian Cai,
	Anshuman Khandual, linux-kernel

On Tue, Jul 02, 2019 at 09:53:24PM +0800, Pingfan Liu wrote:
> undo_isolate_page_range() never fails, so no need to return value.

Heh, this goes back to 2007.

> 
> Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Oscar Salvador <osalvador@suse.de>
> Cc: Qian Cai <cai@lca.pw>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: linux-kernel@vger.kernel.org

Reviewed-by: Oscar Salvador <osalvador@suse.de>

-- 
Oscar Salvador
SUSE L3

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

* Re: [PATCH] mm/page_isolate: change the prototype of undo_isolate_page_range()
  2019-07-02 13:53 [PATCH] mm/page_isolate: change the prototype of undo_isolate_page_range() Pingfan Liu
  2019-07-02 14:02 ` Michal Hocko
  2019-07-02 14:23 ` Oscar Salvador
@ 2019-07-03  6:57 ` Anshuman Khandual
  2 siblings, 0 replies; 4+ messages in thread
From: Anshuman Khandual @ 2019-07-03  6:57 UTC (permalink / raw)
  To: Pingfan Liu, linux-mm
  Cc: Andrew Morton, Michal Hocko, Oscar Salvador, Qian Cai, linux-kernel



On 07/02/2019 07:23 PM, Pingfan Liu wrote:
> undo_isolate_page_range() never fails, so no need to return value.
> 
> Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Oscar Salvador <osalvador@suse.de>
> Cc: Qian Cai <cai@lca.pw>
> Cc: Anshuman Khandual <anshuman.khandual@arm.com>
> Cc: linux-kernel@vger.kernel.org

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

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

end of thread, other threads:[~2019-07-03  6:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 13:53 [PATCH] mm/page_isolate: change the prototype of undo_isolate_page_range() Pingfan Liu
2019-07-02 14:02 ` Michal Hocko
2019-07-02 14:23 ` Oscar Salvador
2019-07-03  6:57 ` 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).