summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-05-15 14:46:30 +0200
committerIngo Molnar <mingo@kernel.org>2025-06-13 10:20:52 +0200
commitaec58b48517c911fbdf2beebba46a347e5910072 (patch)
tree3048c7bb06fc8ff2f33516b57a4bc1a4e83870fa /include/asm-generic
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494 (diff)
bugs/core: Extend __WARN_FLAGS() with the 'cond_str' parameter
Push the new parameter down into every architecture that defines __WARN_FLAGS(): arm64 loongarch parisc powerpc riscv s390 sh x86 Don't pass anything substantial down yet, just propagate the new parameter with empty strings, without generating it or using it. ( The string is never NULL, so it can be concatenated at the preprocessor level. ) Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: linux-arch@vger.kernel.org Link: https://lore.kernel.org/r/20250515124644.2958810-2-mingo@kernel.org
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/bug.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 387720933973..af76e4a04b16 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -100,17 +100,18 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
instrumentation_end(); \
} while (0)
#else
-#define __WARN() __WARN_FLAGS(BUGFLAG_TAINT(TAINT_WARN))
+#define __WARN() __WARN_FLAGS("", BUGFLAG_TAINT(TAINT_WARN))
#define __WARN_printf(taint, arg...) do { \
instrumentation_begin(); \
__warn_printk(arg); \
- __WARN_FLAGS(BUGFLAG_NO_CUT_HERE | BUGFLAG_TAINT(taint));\
+ __WARN_FLAGS("", BUGFLAG_NO_CUT_HERE | BUGFLAG_TAINT(taint));\
instrumentation_end(); \
} while (0)
#define WARN_ON_ONCE(condition) ({ \
int __ret_warn_on = !!(condition); \
if (unlikely(__ret_warn_on)) \
- __WARN_FLAGS(BUGFLAG_ONCE | \
+ __WARN_FLAGS("", \
+ BUGFLAG_ONCE | \
BUGFLAG_TAINT(TAINT_WARN)); \
unlikely(__ret_warn_on); \
})