lkml.org 
[lkml]   [2010]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 41/43] memblock: Protect memblock.h with CONFIG_HAVE_MEMBLOCK
Date
From: Yinghai Lu <yinghai@kernel.org>

This should make it easier to catch/debug incorrect use when
the CONFIG_ option isn't set.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
include/linux/memblock.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index dfa6449..c24b278 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -2,6 +2,7 @@
#define _LINUX_MEMBLOCK_H
#ifdef __KERNEL__

+#ifdef CONFIG_HAVE_MEMBLOCK
/*
* Logical memory blocks.
*
@@ -148,6 +149,8 @@ static inline unsigned long memblock_region_pages(const struct memblock_region *
region++)


+#endif /* CONFIG_HAVE_MEMBLOCK */
+
#endif /* __KERNEL__ */

#endif /* _LINUX_MEMBLOCK_H */
--
1.7.0.4


\
 
 \ /
  Last update: 2010-08-06 07:19    [W:0.145 / U:0.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site