Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754047AbcCWC1K (ORCPT ); Tue, 22 Mar 2016 22:27:10 -0400 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:4525 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772AbcCWC0g (ORCPT ); Tue, 22 Mar 2016 22:26:36 -0400 X-RM-TRANSID: 2ee456f1fed9bc6-9fec3 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee356f1fed5f78-ae432 From: Yaowei Bai To: akpm@linux-foundation.org Cc: n-horiguchi@ah.jp.nec.com, kirill.shutemov@linux.intel.com, rientjes@google.com, iamjoonsoo.kim@lge.com, hannes@cmpxchg.org, vdavydov@virtuozzo.com, kuleshovmail@gmail.com, vbabka@suse.cz, mgorman@techsingularity.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org, baiyaowei@cmss.chinamobile.com Subject: [PATCH 4/5] mm/lru: is_file/active_lru can be boolean Date: Wed, 23 Mar 2016 10:26:08 +0800 Message-Id: <1458699969-3432-5-git-send-email-baiyaowei@cmss.chinamobile.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458699969-3432-1-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1458699969-3432-1-git-send-email-baiyaowei@cmss.chinamobile.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 958 Lines: 34 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 --- 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