[PATCH] mips: remove custom BUILD_BUG()

From: Eric Dumazet
Date: Tue Jan 17 2012 - 00:53:04 EST


Commit 1399ff86f2a2b (kernel.h: add BUILD_BUG() macro) broke mips build

In file included from /opt/src/linux/arch/mips/include/asm/io.h:16:0,
from /opt/src/linux/arch/mips/include/asm/page.h:54,
from include/linux/serial.h:16,
from include/linux/serial_core.h:23,
from include/linux/serial_8250.h:14,
from arch/mips/mti-malta/malta-platform.c:25:
include/linux/kernel.h:717:0: error: "BUILD_BUG" redefined [-Werror]
/opt/src/linux/arch/mips/include/asm/page.h:43:0: note: this is the
location of the previous definition
cc1: all warnings being treated as errors

Remove the conflicting mips macro.

Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>
CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
---
arch/mips/include/asm/page.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index d417909..da9bd7d 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -39,9 +39,6 @@
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
#else /* !CONFIG_HUGETLB_PAGE */
-# ifndef BUILD_BUG
-# define BUILD_BUG() do { extern void __build_bug(void); __build_bug(); } while (0)
-# endif
#define HPAGE_SHIFT ({BUILD_BUG(); 0; })
#define HPAGE_SIZE ({BUILD_BUG(); 0; })
#define HPAGE_MASK ({BUILD_BUG(); 0; })


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/