While writing a MISC driver, I forgot to enable CONFIG_MISC. The only thing
I got at boot was the following obscure error, with no hint about the root
cause:
initcall_run_r(): initcall initr_dm() failed
### ERROR ### Please RESET the board ###
Commit 3346c87625b8 ("dm: Improve handling of a missing uclass") already
tried to improve this case by returning a strange error code and adding a
debug message. But since neither the debug message nor the return code are
displayed by default, it was not very helpful in practice.
This series improves the situation in two ways:
- the missing uclass message is now logged at ERROR level, so it shows up
by default;
- the initcall failure now prints the actual error code (and its string
when ERRNO_STR is enabled), making the root cause easier to track down.
Signed-off-by: Julien Stephan <[email protected]>
---
Julien Stephan (2):
dm: improve logging for missing uclass
initcall: display error code on error
drivers/core/uclass.c | 5 +++--
include/initcall.h | 8 +++++---
2 files changed, 8 insertions(+), 5 deletions(-)
---
base-commit: f562ed02aa7ae4dc2775d90d2e6c40bab82e2715
change-id: 20260806-improve-logging-on-missing-uclass-a76c46acfa13
Best regards,
--
Julien Stephan <[email protected]>