]> Gentwo Git Trees - linux/.git/commitdiff
bugs/s390: Remove private WARN_ON() implementation
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 17 Jun 2025 13:50:41 +0000 (15:50 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 28 Jul 2025 06:07:07 +0000 (08:07 +0200)
Besides an odd __builtin_constant_p() optimization the s390 specific
WARN_ON() implementation is identical to the generic variant.
Drop the s390 variant in favor of the generic variant.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org> # Rebased ancestor commits
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Link: https://lore.kernel.org/r/20250617135042.1878068-2-hca@linux.ibm.com
arch/s390/include/asm/bug.h

index c39500eec3008afb599a34106c290e770ebeb94e..acb4b13d98c5e8caf35f3f814371fece15678269 100644 (file)
@@ -50,20 +50,7 @@ do {                                                         \
        unreachable();                                          \
 } while (0)
 
-#define WARN_ON(x) ({                                  \
-       int __ret_warn_on = !!(x);                      \
-       if (__builtin_constant_p(__ret_warn_on)) {      \
-               if (__ret_warn_on)                      \
-                       __WARN();                       \
-       } else {                                        \
-               if (unlikely(__ret_warn_on))            \
-                       __WARN();                       \
-       }                                               \
-       unlikely(__ret_warn_on);                        \
-})
-
 #define HAVE_ARCH_BUG
-#define HAVE_ARCH_WARN_ON
 
 #include <asm-generic/bug.h>