[PATCH 08/23] jfs: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <brookxu@xxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux