Skip to content

Commit

Permalink
memblock: Protect memblock.h with CONFIG_HAVE_MEMBLOCK
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yinghai Lu authored and Benjamin Herrenschmidt committed Aug 5, 2010
1 parent 25818f0 commit f0b37fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/linux/memblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _LINUX_MEMBLOCK_H
#ifdef __KERNEL__

#ifdef CONFIG_HAVE_MEMBLOCK
/*
* Logical memory blocks.
*
Expand Down Expand Up @@ -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 */

0 comments on commit f0b37fa

Please sign in to comment.