bug: move WARN_ON() "cut here" into exception handler
[sfrench/cifs-2.6.git] / include / asm-generic / bug.h
index b4a2639130a0017eb5f23c2e8fa8686c153e4c8a..384b5c835ced334a19d2552c914cc65be19d69a3 100644 (file)
@@ -10,6 +10,7 @@
 #define BUGFLAG_WARNING                (1 << 0)
 #define BUGFLAG_ONCE           (1 << 1)
 #define BUGFLAG_DONE           (1 << 2)
+#define BUGFLAG_NO_CUT_HERE    (1 << 3)        /* CUT_HERE already sent */
 #define BUGFLAG_TAINT(taint)   ((taint) << 8)
 #define BUG_GET_TAINT(bug)     ((bug)->flags >> 8)
 #endif
@@ -86,13 +87,10 @@ void warn_slowpath_fmt(const char *file, const int line, unsigned taint,
        warn_slowpath_fmt(__FILE__, __LINE__, taint, arg)
 #else
 extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
-#define __WARN() do {                                                  \
-               printk(KERN_WARNING CUT_HERE);                          \
-               __WARN_FLAGS(BUGFLAG_TAINT(TAINT_WARN));                \
-       } while (0)
+#define __WARN()               __WARN_FLAGS(BUGFLAG_TAINT(TAINT_WARN))
 #define __WARN_printf(taint, arg...) do {                              \
                __warn_printk(arg);                                     \
-               __WARN_FLAGS(BUGFLAG_TAINT(taint));                     \
+               __WARN_FLAGS(BUGFLAG_NO_CUT_HERE | BUGFLAG_TAINT(taint));\
        } while (0)
 #define WARN_ON_ONCE(condition) ({                             \
        int __ret_warn_on = !!(condition);                      \