Skip to contentSkip to conversation

mtd: nvmxip: Make use of LBAF for printing lbaint_t

PATCH In review Tom Rini 1 participant 2 messages Jul 11, 2025 – Oct 28, 2025 Memory technology devices (MTD)

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 mtd: nvmxip: Make use of LBAF for printing lbaint_t

When printing the contents of an lbaint_t variable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness.

---
 drivers/mtd/nvmxip/nvmxip.c      | 4 ++--
 drivers/mtd/nvmxip/nvmxip_qspi.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/mtd/nvmxip/nvmxip.c +2 -2
index 594500f0c654..3d8597aca76f 100644
@@ -41,7 +41,7 @@ static ulong nvmxip_blk_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcn
 	if (!buffer)
 		return -EINVAL;
 
-	log_debug("[%s]: reading from blknr: %lu , blkcnt: %lu\n", dev->name, blknr, blkcnt);
+	log_debug("[%s]: reading from blknr: " LBAF " , blkcnt: " LBAF "\n", dev->name, blknr, blkcnt);
 
 	virt_blkaddr = map_sysmem(blkaddr, 0);
 
@@ -86,7 +86,7 @@ static int nvmxip_blk_probe(struct udevice *dev)
 	desc->blksz = BIT(plat->lba_shift);
 	desc->bdev = dev;
 
-	log_debug("[%s]: block storage layout\n    lbas: %lu , log2blksz: %d, blksz: %lu\n",
+	log_debug("[%s]: block storage layout\n    lbas: " LBAF " , log2blksz: %d, blksz: %lu\n",
 		  dev->name, desc->lba, desc->log2blksz, desc->blksz);
 
 	return 0;
drivers/mtd/nvmxip/nvmxip_qspi.c +1 -1
index f14a822b5d5e..1a109bee557a 100644
@@ -49,7 +49,7 @@ static int nvmxip_qspi_of_to_plat(struct udevice *dev)
 		return -EINVAL;
 	}
 
-	log_debug("[%s]: XIP device base addr: 0x%p , lba_shift: %d , lbas: %lu\n",
+	log_debug("[%s]: XIP device base addr: 0x%p , lba_shift: %d , lbas: " LBAF "\n",
 		  dev->name, (void *)(uintptr_t)plat->phys_base, plat->lba_shift, plat->lba);
 
 	return 0;
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 5 lines · Tom Rini

When printing the contents of an lbaint_t variable we need to use LBAF to print it in order to get the correct format type depending on 32 or 64bit-ness.

Applied to u-boot/master, thanks!

[1/1] mtd: nvmxip: Make use of LBAF for printing lbaint_t

      commit: ddc28ad0f2a23097a95fd897e9a3db95e3f20034
Signature · 1 line
Tom