mtd: nvmxip: Make use of LBAF for printing lbaint_t
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.
Signed-off-by Tom Rini <[email protected]>
--- 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
@@ -41,7 +41,7 @@ static ulong nvmxip_blk_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnif (!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
@@ -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
Quoted 5 lines · Tom Rini
When printing the contents of an
lbaint_tvariable 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