aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2008-08-18 03:06:01 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-18 03:20:14 -0400
commit1b72691ce35812ff865d778f303779e774d2b098 (patch)
tree636fdf2bf0217537384914ca2842658bc8e0117d
parentf71066624d5d91bf179a1ea25da0800b72e20c60 (diff)
x86: fix build warnings in real mode code
This recent patch commit c3965bd15118742d72b4bc1a290d37b3f081eb98 Author: Paul Jackson <pj@sgi.com> Date: Wed May 14 08:15:34 2008 -0700 x86 boot: proper use of ARRAY_SIZE instead of repeated E820MAX constant caused these new warnings during a normal build: In file included from linux-2.6/arch/x86/boot/memory.c:17: linux-2.6/include/linux/log2.h: In function '__ilog2_u32': linux-2.6/include/linux/log2.h:34: warning: implicit declaration of function 'fls' linux-2.6/include/linux/log2.h: In function '__ilog2_u64': linux-2.6/include/linux/log2.h:42: warning: implicit declaration of function 'fls64' linux-2.6/include/linux/log2.h: In function '__roundup_pow_of_two ': linux-2.6/include/linux/log2.h:63: warning: implicit declaration of function 'fls_long' I tried to fix them in log2.h, but it's difficult because the real mode environment is completely different from a normal kernel environment. Instead define an own ARRAY_SIZE macro in boot.h, similar to the other private macros there. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/boot/boot.h2
-rw-r--r--arch/x86/boot/memory.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index 616b804a2295..cc0ef13fba7a 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -30,6 +30,8 @@
30/* Useful macros */ 30/* Useful macros */
31#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) 31#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
32 32
33#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
34
33extern struct setup_header hdr; 35extern struct setup_header hdr;
34extern struct boot_params boot_params; 36extern struct boot_params boot_params;
35 37
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c
index 53165c97336b..8c3c25f35578 100644
--- a/arch/x86/boot/memory.c
+++ b/arch/x86/boot/memory.c
@@ -13,7 +13,6 @@
13 */ 13 */
14 14
15#include "boot.h" 15#include "boot.h"
16#include <linux/kernel.h>
17 16
18#define SMAP 0x534d4150 /* ASCII "SMAP" */ 17#define SMAP 0x534d4150 /* ASCII "SMAP" */
19 18