]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
common: move BUILD_BUG_ON define to common.h
authorHeiko Schocher <hs@denx.de>
Wed, 8 Jun 2011 23:07:05 +0000 (23:07 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 27 Jul 2011 21:45:37 +0000 (23:45 +0200)
see discussion also here:
http://patchwork.ozlabs.org/patch/75309/

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Holger Brunck <holger.brunck@keymile.com>

include/common.h
include/ubi_uboot.h

index 6061643873c0cf7aff529596d75d0b8196d8853f..157279122b9b3de5ade66134913608171aae9a50 100644 (file)
@@ -137,6 +137,9 @@ typedef volatile unsigned char      vu_char;
 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
 #endif /* BUG */
 
+/* Force a compilation error if condition is true */
+#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
+
 typedef void (interrupt_handler_t)(void *);
 
 #include <asm/u-boot.h> /* boot information for Linux kernel */
index d2c90a6b44715b64f6fbf5df84e99ba1bc633018..69006e250accd4e28ccec0594bc528b9d2809415 100644 (file)
@@ -191,9 +191,6 @@ static inline long IS_ERR(const void *ptr)
        return IS_ERR_VALUE((unsigned long)ptr);
 }
 
-/* Force a compilation error if condition is true */
-#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
-
 /* module */
 #define THIS_MODULE            0
 #define try_module_get(...)    1