[PATCH v2 3/5] drivers/mtd/nvmxip: Print phys_addr_t without warnings on both 32bit and 64bit systems

Marek Vasut marek.vasut+renesas at mailbox.org
Wed Aug 23 02:18:19 CEST 2023

Cast the address such that it can be printed without warnings
on both 32bit and 64bit systems. This really should use some
better print formatter, but for the lack of it, do it this way.

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
Cc: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
Cc: Simon Glass <sjg at chromium.org>
V2: New patch
 drivers/mtd/nvmxip/nvmxip_qspi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nvmxip/nvmxip_qspi.c b/drivers/mtd/nvmxip/nvmxip_qspi.c
index 1bf0d311fe3..4d7471118a4 100644
--- a/drivers/mtd/nvmxip/nvmxip_qspi.c
+++ b/drivers/mtd/nvmxip/nvmxip_qspi.c
@@ -50,8 +50,8 @@ static int nvmxip_qspi_of_to_plat(struct udevice *dev)
 		return -EINVAL;
-	log_debug("[%s]: XIP device base addr: 0x%llx , lba_shift: %d , lbas: %lu\n",
-		  dev->name, plat->phys_base, plat->lba_shift, plat->lba);
+	log_debug("[%s]: XIP device base addr: 0x%p , lba_shift: %d , lbas: %lu\n",
+		  dev->name, (void *)(uintptr_t)plat->phys_base, plat->lba_shift, plat->lba);
 	return 0;

More information about the U-Boot mailing list