Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363176
| From | Yaowei Bai <baiyaowei@cmss.chinamobile.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/5] mm/vmalloc: is_vmalloc_addr can be boolean |
| Date | 2016-03-23 03:30 +0100 |
| Message-ID | <rfGIy-54a-29@gated-at.bofh.it> (permalink) |
| References | <rfGIx-54a-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This patch makes is_vmalloc_addr 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/mm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index dbf1edd..826d2fb 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -400,14 +400,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
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/5] mm: make several functions return bool Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2016-03-23 03:30 +0100 [PATCH 3/5] mm/vmalloc: is_vmalloc_addr can be boolean Yaowei Bai <baiyaowei@cmss.chinamobile.com> - 2016-03-23 03:30 +0100
csiph-web