[U-Boot] [PATCH] dm: change dm_warn() message into debug() in uclass_add()

The command "dm uclass" tries to display all the UClasses, but some of them might be disabled by Kconfig.
The function do_dm_dump_uclass() iterates over all the UClass IDs and calls uclass_get() for each of them. Then, it displays annoying message "Cannot find uclass for id ..." every time it fails to get the UClass.
As a result, we get much noisier log for the "dm uclass" command.
=> dm uclass uclass 0: root - * root_driver @ bfb54028, seq 0, (req -1)
Cannot find uclass for id 1: please add the UCLASS_DRIVER() ... Cannot find uclass for id 2: please add the UCLASS_DRIVER() ... Cannot find uclass for id 3: please add the UCLASS_DRIVER() ... Cannot find uclass for id 4: please add the UCLASS_DRIVER() ... Cannot find uclass for id 5: please add the UCLASS_DRIVER() ... Cannot find uclass for id 6: please add the UCLASS_DRIVER() ...
This commit suppresses these warnings.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
drivers/core/uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 7de8173..aba9880 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -56,8 +56,8 @@ static int uclass_add(enum uclass_id id, struct uclass **ucp) *ucp = NULL; uc_drv = lists_uclass_lookup(id); if (!uc_drv) { - dm_warn("Cannot find uclass for id %d: please add the UCLASS_DRIVER() declaration for this UCLASS_... id\n", - id); + debug("Cannot find uclass for id %d: please add the UCLASS_DRIVER() declaration for this UCLASS_... id\n", + id); return -ENOENT; } uc = calloc(1, sizeof(*uc));

On 7 July 2015 at 03:51, Masahiro Yamada yamada.masahiro@socionext.com wrote:
The command "dm uclass" tries to display all the UClasses, but some of them might be disabled by Kconfig.
The function do_dm_dump_uclass() iterates over all the UClass IDs and calls uclass_get() for each of them. Then, it displays annoying message "Cannot find uclass for id ..." every time it fails to get the UClass.
As a result, we get much noisier log for the "dm uclass" command.
=> dm uclass uclass 0: root
- root_driver @ bfb54028, seq 0, (req -1)
Cannot find uclass for id 1: please add the UCLASS_DRIVER() ... Cannot find uclass for id 2: please add the UCLASS_DRIVER() ... Cannot find uclass for id 3: please add the UCLASS_DRIVER() ... Cannot find uclass for id 4: please add the UCLASS_DRIVER() ... Cannot find uclass for id 5: please add the UCLASS_DRIVER() ... Cannot find uclass for id 6: please add the UCLASS_DRIVER() ...
This commit suppresses these warnings.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com
drivers/core/uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Acked-by: Simon Glass sjg@chromium.org

On 7 July 2015 at 07:48, Simon Glass sjg@chromium.org wrote:
On 7 July 2015 at 03:51, Masahiro Yamada yamada.masahiro@socionext.com wrote:
The command "dm uclass" tries to display all the UClasses, but some of them might be disabled by Kconfig.
The function do_dm_dump_uclass() iterates over all the UClass IDs and calls uclass_get() for each of them. Then, it displays annoying message "Cannot find uclass for id ..." every time it fails to get the UClass.
As a result, we get much noisier log for the "dm uclass" command.
=> dm uclass uclass 0: root
- root_driver @ bfb54028, seq 0, (req -1)
Cannot find uclass for id 1: please add the UCLASS_DRIVER() ... Cannot find uclass for id 2: please add the UCLASS_DRIVER() ... Cannot find uclass for id 3: please add the UCLASS_DRIVER() ... Cannot find uclass for id 4: please add the UCLASS_DRIVER() ... Cannot find uclass for id 5: please add the UCLASS_DRIVER() ... Cannot find uclass for id 6: please add the UCLASS_DRIVER() ...
This commit suppresses these warnings.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com
drivers/core/uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Acked-by: Simon Glass sjg@chromium.org
Applied to u-boot-dm, thanks!
participants (2)
-
Masahiro Yamada
-
Simon Glass