Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363171 > unrolled thread
| Started by | Yaowei Bai <baiyaowei@cmss.chinamobile.com> |
|---|---|
| First post | 2016-03-23 03:30 +0100 |
| Last post | 2016-03-23 03:30 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/5] mm/hugetlb: is_vm_hugetlb_page can be boolean Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2016-03-23 03:30 +0100
| From | Yaowei Bai <baiyaowei@cmss.chinamobile.com> |
|---|---|
| Date | 2016-03-23 03:30 +0100 |
| Subject | [PATCH 1/5] mm/hugetlb: is_vm_hugetlb_page can be boolean |
| Message-ID | <rfGIy-54a-15@gated-at.bofh.it> |
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@cmss.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
Back to top | Article view | linux.kernel
csiph-web