1 #ifndef _ASM_GENERIC_BUG_H
2 #define _ASM_GENERIC_BUG_H
4 #include <linux/compiler.h>
5 #include <linux/config.h>
10 printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
15 #ifndef HAVE_ARCH_BUG_ON
16 #define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
19 #ifndef HAVE_ARCH_WARN_ON
20 #define WARN_ON(condition) do { \
21 if (unlikely((condition)!=0)) { \
22 printk("BUG: warning at %s:%d/%s()\n", __FILE__, __LINE__, __FUNCTION__); \
28 #else /* !CONFIG_BUG */
33 #ifndef HAVE_ARCH_BUG_ON
34 #define BUG_ON(condition) do { if (condition) ; } while(0)
37 #ifndef HAVE_ARCH_WARN_ON
38 #define WARN_ON(condition) do { if (condition) ; } while(0)