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]
Message-Id: <1458699969-3432-2-git-send-email-baiyaowei@cmss.chinamobile.com>
Date:	Wed, 23 Mar 2016 10:26:05 +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 1/5] mm/hugetlb: is_vm_hugetlb_page can be boolean

This patch makes is_vm_hugetlb_page 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/hugetlb_inline.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/hugetlb_inline.h b/include/linux/hugetlb_inline.h
index 2bb681f..a4e7ca0 100644
--- a/include/linux/hugetlb_inline.h
+++ b/include/linux/hugetlb_inline.h
@@ -5,16 +5,16 @@
 
 #include <linux/mm.h>
 
-static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
+static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma)
 {
 	return !!(vma->vm_flags & VM_HUGETLB);
 }
 
 #else
 
-static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
+static inline bool is_vm_hugetlb_page(struct vm_area_struct *vma)
 {
-	return 0;
+	return false;
 }
 
 #endif
-- 
1.9.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ