Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754011AbcCWC1H (ORCPT ); Tue, 22 Mar 2016 22:27:07 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:9825 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753675AbcCWC0i (ORCPT ); Tue, 22 Mar 2016 22:26:38 -0400 X-RM-TRANSID: 2ee956f1fed889f-9fb74 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee356f1fed5f78-ae42c 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 3/5] mm/vmalloc: is_vmalloc_addr can be boolean Date: Wed, 23 Mar 2016 10:26:07 +0800 Message-Id: <1458699969-3432-4-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: 931 Lines: 36 This patch makes is_vmalloc_addr return bool to improve readability due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai --- include/linux/mm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index dbf1edd..826d2fb 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -400,14 +400,14 @@ unsigned long vmalloc_to_pfn(const void *addr); * On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there * is no special casing required. */ -static inline int is_vmalloc_addr(const void *x) +static inline bool is_vmalloc_addr(const void *x) { #ifdef CONFIG_MMU unsigned long addr = (unsigned long)x; return addr >= VMALLOC_START && addr < VMALLOC_END; #else - return 0; + return false; #endif } #ifdef CONFIG_MMU -- 1.9.1