]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: remove ASSERT compatibility for gcc < 8.x
authorDavid Sterba <dsterba@suse.com>
Tue, 9 Dec 2025 17:10:32 +0000 (18:10 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:49:10 +0000 (07:49 +0100)
The minimum gcc version is 8 since 118c40b7b50340 ("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>
fs/btrfs/messages.h

index d4e4cad0609255778e6675aa7375731e542ba675..943e53980945ea605de695f16806d5de73573015 100644 (file)
@@ -120,7 +120,6 @@ static inline void verify_assert_printk_format(const char *fmt, ...) {
  */
 #define __REST_ARGS(_, ... ) __VA_OPT__(,) __VA_ARGS__
 
-#if defined(CONFIG_CC_IS_CLANG) || GCC_VERSION >= 80000
 /*
  * Assertion with optional printk() format.
  *
@@ -158,22 +157,6 @@ do {                                                                               \
        }                                                                       \
 } while(0)
 
-#else
-
-/* For GCC < 8.x only the simple output. */
-
-#define ASSERT(cond, args...)                                                  \
-do {                                                                           \
-       verify_assert_printk_format("check the format string" args);            \
-       if (!likely(cond)) {                                                    \
-               pr_err("assertion failed: %s :: %ld, in %s:%d\n",               \
-                       #cond, (long)(cond), __FILE__, __LINE__);               \
-               BUG();                                                          \
-       }                                                                       \
-} while(0)
-
-#endif
-
 #else
 /* Compile check the @cond expression but don't generate any code. */
 #define ASSERT(cond, args...)                  BUILD_BUG_ON_INVALID(cond)