From: Heiko Carstens Date: Tue, 17 Jun 2025 13:50:41 +0000 (+0200) Subject: bugs/s390: Remove private WARN_ON() implementation X-Git-Tag: v6.19-rc1~229^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed845c363d8c93eeaad4ce48bb7d5f81b6a75b61;p=thirdparty%2Flinux.git bugs/s390: Remove private WARN_ON() implementation 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 Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar # Rebased ancestor commits Reviewed-by: Alexander Gordeev Link: https://lore.kernel.org/r/20250617135042.1878068-2-hca@linux.ibm.com --- diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index c39500eec3008..acb4b13d98c5e 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h @@ -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