]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/common.h
bug.h: move runtime BUG/WARN macros into <linux/bug.h>
[people/ms/u-boot.git] / include / common.h
index 7ea78bde83f7b97fff36bcbc4fff91aecb495b47..18963355840d9890d7721807468cbce19ab872fc 100644 (file)
@@ -23,6 +23,7 @@ typedef volatile unsigned char        vu_char;
 #include <time.h>
 #include <asm-offsets.h>
 #include <linux/bitops.h>
+#include <linux/bug.h>
 #include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/printk.h>
@@ -90,14 +91,6 @@ void __assert_fail(const char *assertion, const char *file, unsigned line,
        ({ if (!(x) && _DEBUG) \
                __assert_fail(#x, __FILE__, __LINE__, __func__); })
 
-#ifndef BUG
-#define BUG() do { \
-       printf("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
-       panic("BUG!"); \
-} while (0)
-#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
-#endif /* BUG */
-
 typedef void (interrupt_handler_t)(void *);
 
 #include <asm/u-boot.h> /* boot information for Linux kernel */