Commit 1490cf5f authored by David Howells's avatar David Howells Committed by Linus Torvalds

MN10300: Don't try and #include <linux/slab.h> in lib/inflate.c from bootloader

Don't try and #include <linux/slab.h> in lib/inflate.c from the bootloader code
as linux/slab.h hauls in function defs that aren't available in the bootloader
code and may also haul in conflicting functions.

To fix this, make the inclusion of linux/slab.h contingent on NO_INFLATE_MALLOC
as are the usages of kmalloc() and kfree().

In MN10300, this causes the following errors:

In file included from include/linux/string.h:21,
                 from include/linux/bitmap.h:8,
                 from include/linux/nodemask.h:93,
                 from include/linux/mmzone.h:16,
                 from include/linux/gfp.h:4,
                 from include/linux/slab.h:12,
                 from arch/mn10300/boot/compressed/../../../../lib/inflate.c:106,
                 from arch/mn10300/boot/compressed/misc.c:170:
/warthog/am33/linux-2.6-mn10300/arch/mn10300/include/asm/string.h:19: error: conflicting types for 'memset'
arch/mn10300/boot/compressed/misc.c:59: error: previous definition of 'memset' was here
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 019fca84
...@@ -167,6 +167,7 @@ static uch *high_buffer_start /* = (uch *)(((ulg)&end) + HEAP_SIZE)*/; ...@@ -167,6 +167,7 @@ static uch *high_buffer_start /* = (uch *)(((ulg)&end) + HEAP_SIZE)*/;
static char *vidmem = (char *)0xb8000; static char *vidmem = (char *)0xb8000;
static int lines, cols; static int lines, cols;
#define BOOTLOADER_INFLATE
#include "../../../../lib/inflate.c" #include "../../../../lib/inflate.c"
static inline void scroll(void) static inline void scroll(void)
......
...@@ -103,7 +103,9 @@ ...@@ -103,7 +103,9 @@
the two sets of lengths. the two sets of lengths.
*/ */
#include <linux/compiler.h> #include <linux/compiler.h>
#ifdef NO_INFLATE_MALLOC
#include <linux/slab.h> #include <linux/slab.h>
#endif
#ifdef RCSID #ifdef RCSID
static char rcsid[] = "#Id: inflate.c,v 0.14 1993/06/10 13:27:04 jloup Exp #"; static char rcsid[] = "#Id: inflate.c,v 0.14 1993/06/10 13:27:04 jloup Exp #";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment