summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaowei Bai <baiyaowei@cmss.chinamobile.com>2016-05-19 17:11:23 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-19 19:12:14 -0700
commit32f6271dbdc351dce96b11c5f3567bae8188004f (patch)
tree02270c5f3e19e46543be9ba57c358a42635fb904
parent2b18e5321f512aa85fd91db835a4c0dcdb2cd063 (diff)
downloadlinux-32f6271dbdc351dce96b11c5f3567bae8188004f.tar.bz2
mm/hugetlb: is_vm_hugetlb_page() can return bool
Make is_vm_hugetlb_page() return bool to improve readability due to this particular function only using either one or zero as its return value. Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/hugetlb_inline.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/hugetlb_inline.h b/include/linux/hugetlb_inline.h
index 2bb681fbeb35..a4e7ca0f3585 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