lkml.org 
[lkml]   [2020]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 08/23] jfs: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code
Date
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@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
\
 
 \ /
  Last update: 2020-08-27 12:15    [W:0.100 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site