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>
This commit is contained in:
Yaowei Bai 2016-05-19 17:11:23 -07:00 коммит произвёл Linus Torvalds
Родитель 2b18e5321f
Коммит 32f6271dbd
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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