[PATCH] dm: core: downgrade some dm_warn messages to log_debug()
Simon Glass
sjg at chromium.org
Sun Oct 27 18:16:12 CET 2024
Hi Quentin,
On Tue, 15 Oct 2024 at 16:32, Quentin Schulz <foss+uboot at 0leil.net> 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 :)
> ---
> drivers/core/of_access.c | 36 ++++++++++++-------------
> drivers/core/of_addr.c | 26 +++++++++---------
> drivers/core/of_extra.c | 6 ++---
> drivers/core/ofnode.c | 68 ++++++++++++++++++++++++------------------------
> 4 files changed, 68 insertions(+), 68 deletions(-)
This is an improvement, so:
Reviewed-by: Simon Glass <sjg at chromium.org>
For -EOVERFLOW I think warning would be better, but in that case you
need to print a prefix, since otherwise the warning will have nothing
before it. So it is a little tricky. I can imagine some support in the
log module to help with this, although I haven't thought about it too
hard.
Also, we should really remove __func__ when adding logging, since
people can enable the option if they want function names to be stored.
Regards,
Simon
More information about the U-Boot
mailing list