From: Heiko Schocher Date: Thu, 9 Jun 2011 11:07:05 +0200 Subject: [U-Boot] [PATCH v3 1/2] common: move BUILD_BUG_ON define to common.h In-Reply-To: <1292232393-26481-1-git-send-email-hs@denx.de> References: <1292232393-26481-1-git-send-email-hs@denx.de> Message-ID: <1307610425-10481-1-git-send-email-hs@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de see discussion also here: http://patchwork.ozlabs.org/patch/75309/ Signed-off-by: Heiko Schocher cc: Wolfgang Denk cc: Holger Brunck --- - changes for v3 moved this define only to common.h If we find a good name for a headerfile which is suggested in thread: http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/78692 that would be a better place for it. Maybe: include/gp_helpers.h (general purpose helpers ...)? 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 1e4a6a5..5937bf0 100644 --- a/include/common.h +++ b/include/common.h @@ -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 /* boot information for Linux kernel */ diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h index d2c90a6..69006e2 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.7.4.4