diff mbox series

[3/9] dm: core: Fix addresses in the dm static command

Message ID 20220508103927.912854-4-sjg@chromium.org
State Accepted
Commit c625666ea10d88141546807f1b720703ba710eea
Delegated to: Simon Glass
Headers show
Series dm: core: Support collecting and reporting stats | expand

Commit Message

Simon Glass May 8, 2022, 10:39 a.m. UTC
This command converts pointers to addresses, but the pointers being
converted are in the image's rodata region. For sandbox this means it
is not in DRAM so it does not make sense to do this conversion.

Fix this by showing a simple pointer instead. Drop the unnecessary
@ and hex prefixes.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/core/dump.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Simon Glass June 28, 2022, 1:37 p.m. UTC | #1
This command converts pointers to addresses, but the pointers being
converted are in the image's rodata region. For sandbox this means it
is not in DRAM so it does not make sense to do this conversion.

Fix this by showing a simple pointer instead. Drop the unnecessary
@ and hex prefixes.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/core/dump.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/drivers/core/dump.c b/drivers/core/dump.c
index 606883ac941..ce679e26290 100644
--- a/drivers/core/dump.c
+++ b/drivers/core/dump.c
@@ -171,8 +171,6 @@  void dm_dump_static_driver_info(void)
 
 	puts("Driver                    Address\n");
 	puts("---------------------------------\n");
-	for (entry = drv; entry != drv + n_ents; entry++) {
-		printf("%-25.25s @%08lx\n", entry->name,
-		       (ulong)map_to_sysmem(entry->plat));
-	}
+	for (entry = drv; entry != drv + n_ents; entry++)
+		printf("%-25.25s %p\n", entry->name, entry->plat);
 }