Skip to contentSkip to conversation

dm: core: Use full printf() format when possible

PATCH In review Samuel Holland 2 participants 3 messages Jan 21, 2023 – Jan 26, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: core: Use full printf() format when possible

Use a more accurate check for determining if the full format string will be handled correctly, since SPL_USE_TINY_PRINTF can be disabled.

---

 drivers/core/dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/core/dump.c +1 -1
index 1c1f7e4d30..4997862478 100644
@@ -17,7 +17,7 @@ static void show_devices(struct udevice *dev, int depth, int last_flag)
 	u32 flags = dev_get_flags(dev);
 
 	/* print the first 20 characters to not break the tree-format. */
-	printf(IS_ENABLED(CONFIG_SPL_BUILD) ? " %s  %d  [ %c ]   %s  " :
+	printf(CONFIG_IS_ENABLED(USE_TINY_PRINTF) ? " %s  %d  [ %c ]   %s  " :
 	       " %-10.10s  %3d  [ %c ]   %-20.20s  ", dev->uclass->uc_drv->name,
 	       dev_get_uclass_index(dev, NULL),
 	       flags & DM_FLAG_ACTIVATED ? '+' : ' ', dev->driver->name);
Signature · 1 line
2.37.4