提交 32f6271d 编写于 作者: Y Yaowei Bai 提交者: Linus Torvalds

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: NYaowei Bai <baiyaowei@cmss.chinamobile.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 2b18e532
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册