Skip to content

Commit

Permalink
cachefiles: use ASSERT_FAIL()/ASSERT_WARN() to cleanup some code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
brookxu-cn authored and intel-lab-lkp committed Aug 27, 2020
1 parent 073244e commit 417c020
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/cachefiles/internal.h
Expand Up @@ -316,14 +316,7 @@ do { \

#if 1 /* defined(__KDEBUGALL) */

#define ASSERT(X) \
do { \
if (unlikely(!(X))) { \
pr_err("\n"); \
pr_err("Assertion failed\n"); \
BUG(); \
} \
} while (0)
#define ASSERT(X) ASSERT_FAIL(x)

#define ASSERTCMP(X, OP, Y) \
do { \
Expand Down

0 comments on commit 417c020

Please sign in to comment.