diff options
| author | Yaowei Bai <baiyaowei@cmss.chinamobile.com> | 2016-05-19 20:11:26 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-19 22:12:14 -0400 |
| commit | c98940f6fa3d06fa8fec75aa2362b25227573d06 (patch) | |
| tree | 3930de096af7893c7730882b0361254de60e92a7 /include/linux/memory_hotplug.h | |
| parent | 32f6271dbdc351dce96b11c5f3567bae8188004f (diff) | |
mm/memory_hotplug: is_mem_section_removable() can return bool
Make is_mem_section_removable() 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>
Diffstat (limited to 'include/linux/memory_hotplug.h')
| -rw-r--r-- | include/linux/memory_hotplug.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index adbef586e696..20d8a5d4d133 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
| @@ -247,16 +247,16 @@ static inline void mem_hotplug_done(void) {} | |||
| 247 | 247 | ||
| 248 | #ifdef CONFIG_MEMORY_HOTREMOVE | 248 | #ifdef CONFIG_MEMORY_HOTREMOVE |
| 249 | 249 | ||
| 250 | extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); | 250 | extern bool is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); |
| 251 | extern void try_offline_node(int nid); | 251 | extern void try_offline_node(int nid); |
| 252 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); | 252 | extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages); |
| 253 | extern void remove_memory(int nid, u64 start, u64 size); | 253 | extern void remove_memory(int nid, u64 start, u64 size); |
| 254 | 254 | ||
| 255 | #else | 255 | #else |
| 256 | static inline int is_mem_section_removable(unsigned long pfn, | 256 | static inline bool is_mem_section_removable(unsigned long pfn, |
| 257 | unsigned long nr_pages) | 257 | unsigned long nr_pages) |
| 258 | { | 258 | { |
| 259 | return 0; | 259 | return false; |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | static inline void try_offline_node(int nid) {} | 262 | static inline void try_offline_node(int nid) {} |
