Skip to content

Commit ed845c3

Browse files
hcahcaingomolnar
authored andcommitted
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 <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
1 parent 28ea295 commit ed845c3

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

  • arch/s390/include/asm

arch/s390/include/asm/bug.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,7 @@ do { \
5050
unreachable(); \
5151
} while (0)
5252

53-
#define WARN_ON(x) ({ \
54-
int __ret_warn_on = !!(x); \
55-
if (__builtin_constant_p(__ret_warn_on)) { \
56-
if (__ret_warn_on) \
57-
__WARN(); \
58-
} else { \
59-
if (unlikely(__ret_warn_on)) \
60-
__WARN(); \
61-
} \
62-
unlikely(__ret_warn_on); \
63-
})
64-
6553
#define HAVE_ARCH_BUG
66-
#define HAVE_ARCH_WARN_ON
6754

6855
#include <asm-generic/bug.h>
6956

0 commit comments

Comments
 (0)