diff options
| author | Heiko Carstens <hca@linux.ibm.com> | 2026-01-09 18:31:42 +0300 |
|---|---|---|
| committer | Heiko Carstens <hca@linux.ibm.com> | 2026-01-27 14:16:16 +0300 |
| commit | 940cfea4270436edf515bf07d0a778eed6cec16d (patch) | |
| tree | 2ab50bade813fbd75045feeb4561de990a993e26 | |
| parent | 04dabb4261c387318affbdb22c15c31138a989f5 (diff) | |
| download | linux-940cfea4270436edf515bf07d0a778eed6cec16d.tar.xz | |
s390/bug: Implement WARN_ONCE()
This is the s390 variant of commit 11bb4944f014 ("x86/bug: Implement
WARN_ONCE()").
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
| -rw-r--r-- | arch/s390/include/asm/bug.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index 1559873b19b0..1fbcbdbc595f 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h @@ -104,6 +104,17 @@ do { \ #define __WARN_printf(taint, fmt, arg...) \ __WARN_print_arg(BUGFLAG_TAINT(taint), fmt, ## arg) +#define WARN_ONCE(cond, format, arg...) \ +({ \ + int __ret_warn_on = !!(cond); \ + \ + if (unlikely(__ret_warn_on)) { \ + __WARN_print_arg(BUGFLAG_ONCE|BUGFLAG_TAINT(TAINT_WARN),\ + format, ## arg); \ + } \ + __ret_warn_on; \ +}) + #define HAVE_ARCH_BUG #define HAVE_ARCH_BUG_FORMAT #define HAVE_ARCH_BUG_FORMAT_ARGS |
