Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756735Ab1DGTnW (ORCPT ); Thu, 7 Apr 2011 15:43:22 -0400 Received: from relay1.sgi.com ([192.48.179.29]:42639 "HELO relay.sgi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756565Ab1DGTnV (ORCPT ); Thu, 7 Apr 2011 15:43:21 -0400 Message-ID: <4D9E13D4.3080702@sgi.com> Date: Thu, 07 Apr 2011 12:43:16 -0700 From: Mike Travis User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Yinghai Lu , Ingo Molnar Cc: David Rientjes , Jack Steiner , Robin Holt , Len Brown , Thomas Gleixner , "H. Peter Anvin" , Andrew Morton , linux-acpi@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Tejun Heo , Linus Torvalds Subject: Re: [PATCH 1/2] memblock: add error return when CONFIG_HAVE_MEMBLOCK is not set References: <20110225180633.857892225@gulag1.americas.sgi.com> <20110225180634.017570095@gulag1.americas.sgi.com> <20110227120949.GF16453@elte.hu> <20110227121518.GA19165@elte.hu> <4D6AFBB0.70401@kernel.org> <4D6BF63D.2020404@sgi.com> <4D6BFF46.3050001@sgi.com> <4D93CDD7.8000708@sgi.com> In-Reply-To: <4D93CDD7.8000708@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1497 Lines: 55 Was there any further objections to these patches? Mike Travis wrote: > Subject: memblock: add error return when CONFIG_HAVE_MEMBLOCK is not set > Author: Yinghai Lu > > Add an error return if CONFIG_HAVE_MEMBLOCK is not set instead > of having to add #ifdef CONFIG_HAVE_MEMBLOCK around blocks of > code calling that function. > > Signed-off-by: Mike Travis > --- > include/linux/memblock.h | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > --- linux.orig/include/linux/memblock.h > +++ linux/include/linux/memblock.h > @@ -2,6 +2,8 @@ > #define _LINUX_MEMBLOCK_H > #ifdef __KERNEL__ > > +#define MEMBLOCK_ERROR 0 > + > #ifdef CONFIG_HAVE_MEMBLOCK > /* > * Logical memory blocks. > @@ -20,7 +22,6 @@ > #include > > #define INIT_MEMBLOCK_REGIONS 128 > -#define MEMBLOCK_ERROR 0 > > struct memblock_region { > phys_addr_t base; > @@ -160,6 +161,12 @@ static inline unsigned long memblock_reg > #define __initdata_memblock > #endif > > +#else > +static inline phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t > align) > +{ > + return MEMBLOCK_ERROR; > +} > + > #endif /* CONFIG_HAVE_MEMBLOCK */ > > #endif /* __KERNEL__ */ > > -- 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/