summaryrefslogtreecommitdiffstats
path: root/include/common.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2015-01-29 11:14:06 +0900
committerSascha Hauer <s.hauer@pengutronix.de>2015-01-29 08:48:30 +0100
commit8960b0ff81875d569bfd58d185076dd6265ba42b (patch)
treee3d0a666cd90a806c16413985a8a54060c24758f /include/common.h
parenta07a472cac72d336574c438358bbf3c113b16fb5 (diff)
downloadbarebox-8960b0ff81875d569bfd58d185076dd6265ba42b.tar.gz
barebox-8960b0ff81875d569bfd58d185076dd6265ba42b.tar.xz
asm-generic/bug.h: move BUG(), BUG_ON(), WARN(), WARN_ON() macros
In Linux, these macros are defined in include/asm-generic/bug.h. To tidy up common.h, move BUG(), BUG_ON(), WARN(), WARN_ON() there. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/include/common.h b/include/common.h
index c30f6bd735..289f7c931a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -50,38 +50,6 @@
#error "None of __LITTLE_ENDIAN and __BIG_ENDIAN are defined"
#endif
-#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)
-
-
-#define __WARN() do { \
- printf("WARNING: at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
-} while (0)
-
-#ifndef WARN_ON
-#define WARN_ON(condition) ({ \
- int __ret_warn_on = !!(condition); \
- if (unlikely(__ret_warn_on)) \
- __WARN(); \
- unlikely(__ret_warn_on); \
-})
-#endif
-
-#ifndef WARN
-#define WARN(condition, format...) ({ \
- int __ret_warn_on = !!(condition); \
- if (unlikely(__ret_warn_on)) { \
- __WARN(); \
- puts("WARNING: "); \
- printf(format); \
- } \
- unlikely(__ret_warn_on); \
-})
-#endif
-
#include <asm/barebox.h> /* boot information for Linux kernel */
/*