Re: [PATCH] bug: Introduce CONFIG_DEBUG_BUGVERBOSE_EXTRA=y to also log warning conditions
From: Peter Zijlstra
Date: Tue Mar 25 2025 - 09:20:04 EST
On Tue, Mar 25, 2025 at 12:18:39PM +0100, Ingo Molnar wrote:
> So, to argue this via code, we'd like to have something like the patch below?
I would do it differently. If we know the thing is a simple string, we
can stick it in bug_entry and print from __report_bug() without causing
horrific shite at the call site.
The problem with WARN() is that it is a format string, which must be
filled out in situ. Resulting in calls to snprintf() and arguments and
whatnot.