[PATCH 1/2] bugs/s390: Remove private WARN_ON() implementation

Heiko Carstens
2025-06-17T13:50:51Z

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>
---
arch/s390/include/asm/bug.h | 13 -------------
1 file changed, 13 deletions(-)

diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h
index 837bfbde0c51..58ab4efd9dd5 100644
--- a/arch/s390/include/asm/bug.h
+++ b/arch/s390/include/asm/bug.h
@@ -48,20 +48,7 @@
__EMIT_BUG(cond_str, BUGFLAG_WARNING|(flags)); \
} 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
#endif /* CONFIG_BUG */

#include <asm-generic/bug.h>
--
2.48.1