[PATCH 1/1] dm: fix misleading messages

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Sat Nov 4 19:47:16 CET 2023


When no RNG device exists for a driver referenced via U_BOOT_DRVINFO() we
get messages like:

    No match for driver 'arm-rndr'
    Some drivers were not found

This is misleading as it is not the driver that was not found, it is the
device that is not found. Correct the messages.

Reported-by: Andre Przywara <andre.przywara at arm.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 drivers/core/lists.c | 2 +-
 drivers/core/root.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 8034a8f48d..e39d3acc97 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -97,7 +97,7 @@ static int bind_drivers_pass(struct udevice *parent, bool pre_reloc_only)
 			if (CONFIG_IS_ENABLED(OF_PLATDATA))
 				drt->dev = dev;
 		} else if (ret != -EPERM) {
-			dm_warn("No match for driver '%s'\n", entry->name);
+			dm_warn("No device for driver '%s'\n", entry->name);
 			if (!result || ret != -ENOENT)
 				result = ret;
 		}
diff --git a/drivers/core/root.c b/drivers/core/root.c
index d4ae652bcf..29c918eb73 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -167,7 +167,7 @@ int dm_scan_plat(bool pre_reloc_only)
 
 	ret = lists_bind_drivers(DM_ROOT_NON_CONST, pre_reloc_only);
 	if (ret == -ENOENT) {
-		dm_warn("Some drivers were not found\n");
+		dm_warn("Some devices were not found\n");
 		ret = 0;
 	}
 
-- 
2.40.1



More information about the U-Boot mailing list