[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1458699969-3432-5-git-send-email-baiyaowei@cmss.chinamobile.com>
Date: Wed, 23 Mar 2016 10:26:08 +0800
From: Yaowei Bai <baiyaowei@...s.chinamobile.com>
To: akpm@...ux-foundation.org
Cc: n-horiguchi@...jp.nec.com, kirill.shutemov@...ux.intel.com,
rientjes@...gle.com, iamjoonsoo.kim@....com, hannes@...xchg.org,
vdavydov@...tuozzo.com, kuleshovmail@...il.com, vbabka@...e.cz,
mgorman@...hsingularity.net, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, baiyaowei@...s.chinamobile.com
Subject: [PATCH 4/5] mm/lru: is_file/active_lru can be boolean
This patch makes is_file/active_lru return bool to improve
readability due to these particular functions only using either
one or zero as their return value.
No functional change.
Signed-off-by: Yaowei Bai <baiyaowei@...s.chinamobile.com>
---
include/linux/mmzone.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 6de02ac3..652d60e 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -188,12 +188,12 @@ enum lru_list {
#define for_each_evictable_lru(lru) for (lru = 0; lru <= LRU_ACTIVE_FILE; lru++)
-static inline int is_file_lru(enum lru_list lru)
+static inline bool is_file_lru(enum lru_list lru)
{
return (lru == LRU_INACTIVE_FILE || lru == LRU_ACTIVE_FILE);
}
-static inline int is_active_lru(enum lru_list lru)
+static inline bool is_active_lru(enum lru_list lru)
{
return (lru == LRU_ACTIVE_ANON || lru == LRU_ACTIVE_FILE);
}
--
1.9.1
Powered by blists - more mailing lists