Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934345Ab0HFFRV (ORCPT ); Fri, 6 Aug 2010 01:17:21 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:33776 "EHLO e23smtp03.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933796Ab0HFFPh (ORCPT ); Fri, 6 Aug 2010 01:15:37 -0400 From: Benjamin Herrenschmidt To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, torvalds@linux-foundation.org, Yinghai Lu , Benjamin Herrenschmidt Subject: [PATCH 41/43] memblock: Protect memblock.h with CONFIG_HAVE_MEMBLOCK Date: Fri, 6 Aug 2010 15:15:22 +1000 Message-Id: <1281071724-28740-42-git-send-email-benh@kernel.crashing.org> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1281071724-28740-1-git-send-email-benh@kernel.crashing.org> References: <1281071724-28740-1-git-send-email-benh@kernel.crashing.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1096 Lines: 40 From: Yinghai Lu This should make it easier to catch/debug incorrect use when the CONFIG_ option isn't set. Signed-off-by: Yinghai Lu Signed-off-by: Benjamin Herrenschmidt --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/