linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/vmscan: change return type of is_page_cache_freeable from int to bool
@ 2017-11-28  2:48 Jiang Biao
  2017-11-28  8:04 ` Michal Hocko
  0 siblings, 1 reply; 3+ messages in thread
From: Jiang Biao @ 2017-11-28  2:48 UTC (permalink / raw)
  To: akpm, mhocko, hannes, hillf.zj, minchan, ying.huang, mgorman
  Cc: linux-mm, linux-kernel, jiang.biao2, zhong.weidong

Using bool for the return type of is_page_cache_freeable() should be
more appropriate.

Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index eb2f031..5fe63ed 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -530,7 +530,7 @@ void drop_slab(void)
 		drop_slab_node(nid);
 }
 
-static inline int is_page_cache_freeable(struct page *page)
+static inline bool is_page_cache_freeable(struct page *page)
 {
 	/*
 	 * A freeable page cache page is referenced only by the caller
-- 
2.7.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm/vmscan: change return type of is_page_cache_freeable from int to bool
  2017-11-28  2:48 [PATCH] mm/vmscan: change return type of is_page_cache_freeable from int to bool Jiang Biao
@ 2017-11-28  8:04 ` Michal Hocko
  2017-11-28  9:21   ` [PATCH] mm/vmscan: change return type of is_page_cache_freeablefrom " jiang.biao2
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Hocko @ 2017-11-28  8:04 UTC (permalink / raw)
  To: Jiang Biao
  Cc: akpm, hannes, hillf.zj, minchan, ying.huang, mgorman, linux-mm,
	linux-kernel, zhong.weidong

On Tue 28-11-17 10:48:27, Jiang Biao wrote:
> Using bool for the return type of is_page_cache_freeable() should be
> more appropriate.

Does this help to generate a better code or why do we want to change
this at all?

> Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
> ---
>  mm/vmscan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index eb2f031..5fe63ed 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -530,7 +530,7 @@ void drop_slab(void)
>  		drop_slab_node(nid);
>  }
>  
> -static inline int is_page_cache_freeable(struct page *page)
> +static inline bool is_page_cache_freeable(struct page *page)
>  {
>  	/*
>  	 * A freeable page cache page is referenced only by the caller
> -- 
> 2.7.4
> 

-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] mm/vmscan: change return type of is_page_cache_freeablefrom int to bool
  2017-11-28  8:04 ` Michal Hocko
@ 2017-11-28  9:21   ` jiang.biao2
  0 siblings, 0 replies; 3+ messages in thread
From: jiang.biao2 @ 2017-11-28  9:21 UTC (permalink / raw)
  To: mhocko
  Cc: akpm, hannes, hillf.zj, minchan, ying.huang, mgorman, linux-mm,
	linux-kernel, zhong.weidong


[-- Attachment #1.1: Type: text/plain, Size: 263 bytes --]

> On Tue 28-11-17 10:48:27, Jiang Biao wrote:> > Using bool for the return type of is_page_cache_freeable() should be
> > more appropriate.
> 
> Does this help to generate a better code or why do we want to change
> this at all?
No. Pls just ignore that.

Thanks.

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

end of thread, other threads:[~2017-11-28  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-28  2:48 [PATCH] mm/vmscan: change return type of is_page_cache_freeable from int to bool Jiang Biao
2017-11-28  8:04 ` Michal Hocko
2017-11-28  9:21   ` [PATCH] mm/vmscan: change return type of is_page_cache_freeablefrom " jiang.biao2

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