Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754016AbcCWDRT (ORCPT ); Tue, 22 Mar 2016 23:17:19 -0400 Received: from smtprelay0240.hostedemail.com ([216.40.44.240]:51635 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750921AbcCWDRO (ORCPT ); Tue, 22 Mar 2016 23:17:14 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3350:3622:3653:3867:4321:5007:6261:6642:6742:10004:10400:10848:11026:11232:11658:11783:11889:11914:12043:12296:12517:12519:12740:13069:13161:13229:13311:13357:13439:13894:14659:14721:21080:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: roof84_4788b78f632d X-Filterd-Recvd-Size: 1957 Message-ID: <1458703028.22080.7.camel@perches.com> Subject: Re: [PATCH 4/5] mm/lru: is_file/active_lru can be boolean From: Joe Perches To: Yaowei Bai , 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 Date: Tue, 22 Mar 2016 20:17:08 -0700 In-Reply-To: <1458699969-3432-5-git-send-email-baiyaowei@cmss.chinamobile.com> References: <1458699969-3432-1-git-send-email-baiyaowei@cmss.chinamobile.com> <1458699969-3432-5-git-send-email-baiyaowei@cmss.chinamobile.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 783 Lines: 17 On Wed, 2016-03-23 at 10:26 +0800, Yaowei Bai wrote: > 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. These assignments to int should likely be modified too $ git grep -w -n is_file_lru include/linux/mmzone.h:191:static inline int is_file_lru(enum lru_list lru) mm/vmscan.c:1404:???????????????????????????????????nr_taken, mode, is_file_lru(lru)); mm/vmscan.c:1525:???????????????????????int file = is_file_lru(lru); mm/vmscan.c:1581:???????int file = is_file_lru(lru); mm/vmscan.c:1783:???????int file = is_file_lru(lru); mm/vmscan.c:1934:???????if (is_file_lru(lru)) mm/vmscan.c:2129:???????????????????????int file = is_file_lru(lru);