]> xenbits.xensource.com Git - people/gdunlap/xen.git/commitdiff
prune unused ASSERT/BUG/WARN infrastructure
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 13 Mar 2015 10:24:52 +0000 (11:24 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 13 Mar 2015 10:24:52 +0000 (11:24 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/drivers/char/console.c
xen/include/xen/lib.h

index cb0c2d6f00e53faf2b112a8c6ce93749649c443b..fce4cc8a821370bb760f3d64c496b9c3247fee1a 100644 (file)
@@ -1150,21 +1150,6 @@ void panic(const char *fmt, ...)
         machine_restart(5000);
 }
 
-void __bug(const char *file, int line)
-{
-    console_start_sync();
-    printk("Xen BUG at %s:%d\n", file, line);
-    dump_execution_state();
-    panic("Xen BUG at %s:%d", file, line);
-}
-
-void __warn(const char *file, int line)
-{
-    printk("Xen WARN at %s:%d\n", file, line);
-    dump_execution_state();
-}
-
-
 /*
  * **************************************************************
  * ****************** Console suspend/resume ********************
index ca3916bd0d4cc4d20d91a858f7eb23b1bd42ab65..6c8dd86ae823362a8eedfe6a6c1e4e1cc9ae0e17 100644 (file)
@@ -8,9 +8,6 @@
 #include <xen/string.h>
 #include <asm/bug.h>
 
-void noreturn __bug(const char *file, int line);
-void __warn(const char *file, int line);
-
 #define BUG_ON(p)  do { if (unlikely(p)) BUG();  } while (0)
 #define WARN_ON(p) do { if (unlikely(p)) WARN(); } while (0)
 
@@ -29,15 +26,6 @@ void __warn(const char *file, int line);
 #define BUILD_BUG_ON(cond) ((void)BUILD_BUG_ON_ZERO(cond))
 #endif
 
-#ifndef assert_failed
-#define assert_failed(p)                                        \
-do {                                                            \
-    printk("Assertion '%s' failed, line %d, file %s\n", p ,     \
-                   __LINE__, __FILE__);                         \
-    BUG();                                                      \
-} while (0)
-#endif
-
 #ifndef NDEBUG
 #define ASSERT(p) \
     do { if ( unlikely(!(p)) ) assert_failed(#p); } while (0)