[PATCH] dm: core: downgrade some dm_warn messages to log_debug()

Quentin Schulz quentin.schulz at cherry.de
Wed Oct 16 13:31:30 CEST 2024



On 10/15/24 4:32 PM, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz at cherry.de>
> 
> People complained that enabling (SPL_)DM_WARN was now totally unusable
> due to the amount of messages printed on the console.
> 
> Let's downgrade the log level of some messages that are clearly not on
> the error path.
> 
> Note that there's one pr_debug in there, because it is followed by
> pr_cont so it made sense to reuse the same family of functions.
> 
> Reported-by: Alexander Dahl <ada at thorsis.com>
> Fixes: 6afdb1585112 ("dm: core: migrate debug() messages to use dm_warn")
> Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
> ---
> Note that I am not entirely sure about the "not found" and "not large
> enough" changes there.
> 
> Another note, %#x isn't handled by tinyprintf so it just prints "x"
> instead of the value.
> 
> Finally, I don't know how one can enable LOG_DEBUG level without
> enabling DEBUG which enables assert() so I just tested that by removing
> the #define DEBUG in include/log.h :)

Ah, and I was also wondering if we shouldn't actually use

log(LOGC_DM, LOGL_DEBUG, ...)

instead of log_debug() (which uses LOGL_CATEGORY, set by UCLASSes or 
drivers usually as far as I could tell?)

If we do, then maybe having dm_debug() similarly to dm_warn() would make 
sense?

Cheers,
Quentin


More information about the U-Boot mailing list