lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Mar 2016 10:26:07 +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 3/5] mm/vmalloc: is_vmalloc_addr can be boolean

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 <baiyaowei@...s.chinamobile.com>
---
 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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ