Skip to content

Commit e004221

Browse files
committed
btrfs: remove ASSERT compatibility for gcc < 8.x
The minimum gcc version is 8 since 118c40b ("kbuild: require gcc-8 and binutils-2.30"), the workaround for missing __VA_OPT__ support is not needed. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 77b0402 commit e004221

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

fs/btrfs/messages.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ static inline void verify_assert_printk_format(const char *fmt, ...) {
120120
*/
121121
#define __REST_ARGS(_, ... ) __VA_OPT__(,) __VA_ARGS__
122122

123-
#if defined(CONFIG_CC_IS_CLANG) || GCC_VERSION >= 80000
124123
/*
125124
* Assertion with optional printk() format.
126125
*
@@ -158,22 +157,6 @@ do { \
158157
} \
159158
} while(0)
160159

161-
#else
162-
163-
/* For GCC < 8.x only the simple output. */
164-
165-
#define ASSERT(cond, args...) \
166-
do { \
167-
verify_assert_printk_format("check the format string" args); \
168-
if (!likely(cond)) { \
169-
pr_err("assertion failed: %s :: %ld, in %s:%d\n", \
170-
#cond, (long)(cond), __FILE__, __LINE__); \
171-
BUG(); \
172-
} \
173-
} while(0)
174-
175-
#endif
176-
177160
#else
178161
/* Compile check the @cond expression but don't generate any code. */
179162
#define ASSERT(cond, args...) BUILD_BUG_ON_INVALID(cond)

0 commit comments

Comments
 (0)