lkml.org 
[lkml]   [2011]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] vmalloc: remove #ifdef in function body
Date
We don't like function body which include #ifdef.
If we can, define null function to go out compile time.
It's trivial, no functional change.

Signed-off-by: Minchan Kim <minchan@kernel.org>
---
mm/vmalloc.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 0aca3ce..e1fa5a6 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -505,6 +505,7 @@ static void unmap_vmap_area(struct vmap_area *va)
vunmap_page_range(va->va_start, va->va_end);
}

+#ifdef CONFIG_DEBUG_PAGEALLOC
static void vmap_debug_free_range(unsigned long start, unsigned long end)
{
/*
@@ -520,11 +521,15 @@ static void vmap_debug_free_range(unsigned long start, unsigned long end)
* debugging doesn't do a broadcast TLB flush so it is a lot
* faster).
*/
-#ifdef CONFIG_DEBUG_PAGEALLOC
vunmap_page_range(start, end);
flush_tlb_kernel_range(start, end);
-#endif
}
+#else
+static inline void vmap_debug_free_range(unsigned long start,
+ unsigned long end)
+{
+}
+#endif

/*
* lazy_max_pages is the maximum amount of virtual address space we gather up
--
1.7.6.4


\
 
 \ /
  Last update: 2011-12-21 06:21    [W:0.046 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site