view remove_assfail @ 1:be7e3e4b76b7

attempt 2
author Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
date Sun, 29 Jul 2007 01:16:05 -0400
parents
children
line wrap: on
line source

XFS: Removed a useless wrapper: assfail

Cc: xfs-masters@oss.sgi.com
Cc: xfs@oss.sgi.com
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>

diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c
index f45a49f..fafc048 100644
--- a/fs/xfs/support/debug.c
+++ b/fs/xfs/support/debug.c
@@ -74,10 +74,3 @@ icmn_err(register int level, char *fmt, va_list ap)
 	spin_unlock_irqrestore(&xfs_err_lock,flags);
 	BUG_ON(level == CE_PANIC);
 }
-
-void
-assfail(char *expr, char *file, int line)
-{
-	printk("Assertion failed: %s, file: %s, line: %d\n", expr, file, line);
-	BUG();
-}
diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h
index a27a7c8..86c5103 100644
--- a/fs/xfs/support/debug.h
+++ b/fs/xfs/support/debug.h
@@ -31,10 +31,8 @@ extern void icmn_err(int, char *, va_list)
 	__attribute__ ((format (printf, 2, 0)));
 extern void cmn_err(int, char *, ...)
 	__attribute__ ((format (printf, 2, 3)));
-extern void assfail(char *expr, char *f, int l);
 
-#define ASSERT_ALWAYS(expr)	\
-	(unlikely((expr) != 0) ? (void)0 : assfail(#expr, __FILE__, __LINE__))
+#define ASSERT_ALWAYS(expr)	BUG_ON(!(expr))
 
 #ifndef DEBUG
 # define ASSERT(expr)	((void)0)