Since ASSERT_FAIL() and ASSERT_WARN() have been provided, ASSERT()
may be realized through them, thus reducing code redundancy and
facilitating problem analysis.

Signed-off-by: Chunguang Xu <broo...@tencent.com>
---
 fs/jfs/jfs_debug.h | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/fs/jfs/jfs_debug.h b/fs/jfs/jfs_debug.h
index 48e2150..0a2f0e5 100644
--- a/fs/jfs/jfs_debug.h
+++ b/fs/jfs/jfs_debug.h
@@ -24,22 +24,11 @@
 #endif
 
 /*
- *     assert with traditional printf/panic
- */
-#define assert(p) do { \
-       if (!(p)) {     \
-               printk(KERN_CRIT "BUG at %s:%d assert(%s)\n",   \
-                      __FILE__, __LINE__, #p);                 \
-               BUG();  \
-       }               \
-} while (0)
-
-/*
  *     debug ON
  *     --------
  */
 #ifdef CONFIG_JFS_DEBUG
-#define ASSERT(p) assert(p)
+#define ASSERT(p) ASSERT_FAIL(p)
 
 /* printk verbosity */
 #define JFS_LOGLEVEL_ERR 1
-- 
1.8.3.1

Reply via email to