aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-generic/bug.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index d56fedbb457a..1a0e1a7684bd 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -31,14 +31,19 @@ struct bug_entry {
31#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0) 31#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0)
32#endif 32#endif
33 33
34#ifndef HAVE_ARCH_WARN_ON 34#ifndef __WARN
35#define __WARN() do { \
36 printk("WARNING: at %s:%d %s()\n", __FILE__, \
37 __LINE__, __FUNCTION__); \
38 dump_stack(); \
39} while (0)
40#endif
41
42#ifndef WARN_ON
35#define WARN_ON(condition) ({ \ 43#define WARN_ON(condition) ({ \
36 int __ret_warn_on = !!(condition); \ 44 int __ret_warn_on = !!(condition); \
37 if (unlikely(__ret_warn_on)) { \ 45 if (unlikely(__ret_warn_on)) \
38 printk("WARNING: at %s:%d %s()\n", __FILE__, \ 46 __WARN(); \
39 __LINE__, __FUNCTION__); \
40 dump_stack(); \
41 } \
42 unlikely(__ret_warn_on); \ 47 unlikely(__ret_warn_on); \
43}) 48})
44#endif 49#endif