Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb00a789 authored by Yaowei Bai's avatar Yaowei Bai Committed by Linus Torvalds
Browse files

mm/vmalloc.c: is_vmalloc_addr() can return bool



Make is_vmalloc_addr() return bool to improve readability due to this
particular function only using either one or zero as its return value.

Signed-off-by: default avatarYaowei Bai <baiyaowei@cmss.chinamobile.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c98940f6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -447,14 +447,14 @@ unsigned long vmalloc_to_pfn(const void *addr);
 * On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there
 * is no special casing required.
 */
static inline int is_vmalloc_addr(const void *x)
static inline bool is_vmalloc_addr(const void *x)
{
#ifdef CONFIG_MMU
	unsigned long addr = (unsigned long)x;

	return addr >= VMALLOC_START && addr < VMALLOC_END;
#else
	return 0;
	return false;
#endif
}
#ifdef CONFIG_MMU