Skip to content

Commit

Permalink
lib/decompress_*: only include <linux/slab.h> if STATIC is not defined
Browse files Browse the repository at this point in the history
These includes were added by 079effb
("kmemtrace, kbuild: fix slab.h dependency problem in
lib/decompress_inflate.c") to fix the build when using kmemtrace.  However
this is not necessary when used to create a compressed kernel, and
actually creates issues (brings a lot of things unavailable in the
decompression environment), so don't include it if STATIC is defined.

Signed-off-by: Albin Tonnerre <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Russell King <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: Eduard - Gabriel Munteanu <[email protected]>
Cc: Phillip Lougher <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Albin Tonnerre authored and torvalds committed Aug 7, 2009
1 parent b1af431 commit 9e5cf0c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/decompress_bunzip2.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
#define PREBOOT
#else
#include <linux/decompress/bunzip2.h>
#include <linux/slab.h>
#endif /* STATIC */

#include <linux/decompress/mm.h>
#include <linux/slab.h>

#ifndef INT_MAX
#define INT_MAX 0x7fffffff
Expand Down
2 changes: 1 addition & 1 deletion lib/decompress_inflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#include "zlib_inflate/inflate.h"

#include "zlib_inflate/infutil.h"
#include <linux/slab.h>

#endif /* STATIC */

#include <linux/decompress/mm.h>
#include <linux/slab.h>

#define GZIP_IOBUF_SIZE (16*1024)

Expand Down
2 changes: 1 addition & 1 deletion lib/decompress_unlzma.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
#define PREBOOT
#else
#include <linux/decompress/unlzma.h>
#include <linux/slab.h>
#endif /* STATIC */

#include <linux/decompress/mm.h>
#include <linux/slab.h>

#define MIN(a, b) (((a) < (b)) ? (a) : (b))

Expand Down

0 comments on commit 9e5cf0c

Please sign in to comment.