From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH 29/31] memblock: Prepare to include linux/memblock.h in core file Date: Wed, 28 Jul 2010 15:27:31 +1000 Message-ID: <1280294851.1970.242.camel@pasglop> References: <1279822864-17154-1-git-send-email-yinghai@kernel.org> <1279822864-17154-30-git-send-email-yinghai@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from gate.crashing.org ([63.228.1.57]:52179 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752959Ab0G1F15 (ORCPT ); Wed, 28 Jul 2010 01:27:57 -0400 In-Reply-To: <1279822864-17154-30-git-send-email-yinghai@kernel.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Yinghai Lu Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , David Miller , Linus Torvalds , Johannes Weiner , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org On Thu, 2010-07-22 at 11:21 -0700, Yinghai Lu wrote: > Need to add protection in linux/memblock.h, to prepare to include it in > mm/page_alloc.c and mm/bootmem.c etc. Not really no ... having the definitions shouldn't hurt whether memblock is used or not, no ? I'm going to keep that patch in the queue because it has one advantage that you don't mention, which is to more easily catch attempts to use those functions when CONFIG_HAVE_MEMBLOCK isn't set, but I'll update the commit message. Ben. > Signed-off-by: Yinghai Lu > --- > 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 89749c4..4aaaf0d 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. > * > @@ -147,6 +148,8 @@ static inline unsigned long memblock_region_pages(const struct memblock_region * > region++) > > > +#endif /* CONFIG_HAVE_MEMBLOCK */ > + > #endif /* __KERNEL__ */ > > #endif /* _LINUX_MEMBLOCK_H */