Message ID | 4D93CDD7.8000708@sgi.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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 <yinghai@kernel.org> > > 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 <travis@sgi.com> > --- > 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 <asm/memblock.h> > > #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-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
* Mike Travis <travis@sgi.com> wrote:
> Was there any further objections to these patches?
No big objections that i remember - so assuming review feedback has been
addressed please send the latest and greatest in a new thread, this one is
getting a bit deep :-)
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--- 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 <asm/memblock.h> #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__ */