Skip to content

Commit bb39faa

Browse files
committed
bugs/riscv: Concatenate 'cond_str' with '__FILE__' in __BUG_FLAGS(), to extend WARN_ON/BUG_ON output
Extend WARN_ON and BUG_ON style output from: WARNING: CPU: 0 PID: 0 at kernel/sched/core.c:8511 sched_init+0x20/0x410 to: WARNING: CPU: 0 PID: 0 at [idx < 0 && ptr] kernel/sched/core.c:8511 sched_init+0x20/0x410 Note that the output will be further reorganized later in this series. Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Ingo Molnar <mingo@kernel.org> # Rebased ancestor commits Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexandre Ghiti <alex@ghiti.fr> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: linux-arch@vger.kernel.org Cc: linux-riscv@lists.infradead.org Link: https://lore.kernel.org/r/20250515124644.2958810-13-mingo@kernel.org
1 parent 7e8c292 commit bb39faa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • arch/riscv/include/asm

arch/riscv/include/asm/bug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ do { \
6161
".org 2b + %3\n\t" \
6262
".popsection" \
6363
: \
64-
: "i" (__FILE__), "i" (__LINE__), \
64+
: "i" (WARN_CONDITION_STR(cond_str) __FILE__), "i" (__LINE__), \
6565
"i" (flags), \
6666
"i" (sizeof(struct bug_entry))); \
6767
} while (0)

0 commit comments

Comments
 (0)