diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-09-16 14:10:45 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-10-04 12:00:20 -0400 |
commit | 0a70fb4c1c180d6ad6cd4c1dcd3fae8c5d4dd62e (patch) | |
tree | b6f0c93e64ad4534e982ad28eaa599fa92f38e33 /include/common.h | |
parent | 059a48096c883e98bc1a4a561abc0069f44cbfea (diff) | |
download | u-boot-0a70fb4c1c180d6ad6cd4c1dcd3fae8c5d4dd62e.tar.gz |
bug.h: move runtime BUG/WARN macros into <linux/bug.h>
Collect runtime BUG/WARN into a self-contained header <linux/bug.h>
to make these macros easier to use.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/include/common.h b/include/common.h index 7ea78bde83..1896335584 100644 --- a/include/common.h +++ b/include/common.h @@ -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 */ |