summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2025-06-02 15:08:30 +0200
committerPeter Zijlstra <peterz@infradead.org>2025-11-24 20:23:25 +0100
commit11bb4944f014d756f35261f5afcb346901ef1efa (patch)
tree2c844bd303208a62f312694dd00dd68877a702a9 /include/asm-generic
parent5b472b6e5bd951b208fbbe373892891398eb5ad1 (diff)
x86/bug: Implement WARN_ONCE()
Implement WARN_ONCE like WARN using BUGFLAG_ONCE. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20251110115758.339309119@infradead.org
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/bug.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index e512071216be..09e8eccee8ed 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -180,8 +180,10 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
DO_ONCE_LITE_IF(condition, WARN_ON, 1)
#endif
+#ifndef WARN_ONCE
#define WARN_ONCE(condition, format...) \
DO_ONCE_LITE_IF(condition, WARN, 1, format)
+#endif
#define WARN_TAINT_ONCE(condition, taint, format...) \
DO_ONCE_LITE_IF(condition, WARN_TAINT, 1, taint, format)