From: Michael Zaidman Date: Thu, 1 Apr 2010 20:16:53 +0300 Subject: [U-Boot] [PATCH 1/3] The BUILD_BUG_ON macros moved from ubi_uboot.h to common.h Message-ID: <1270142213-24765-1-git-send-email-michael.zaidman@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The BUILD_BUG_ON macros made availible for rest of the u-boot code by moving it from ubi_uboot.h to common.h. In Linux kernel this widely used macros is defined in kernel.h file. Signed-off-by: Michael Zaidman --- include/common.h | 3 +++ include/ubi_uboot.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/common.h b/include/common.h index a133e34..7c22e69 100644 --- a/include/common.h +++ b/include/common.h @@ -136,6 +136,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 /* boot information for Linux kernel */ diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h index 60f6a5f..20e3da5 100644 --- a/include/ubi_uboot.h +++ b/include/ubi_uboot.h @@ -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 -- 1.6.3.3