[PATCH] mtd: spi-nor: fix format specifier in debug message
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Jan 31 15:03:47 PST 2024
The type size_t is to be printed with the %zu modifier as it's not
necessarily typedef'ed as unsigned long, even if for barebox purposes,
the sizeof(size_t) is always equal to sizeof(ulong).
Building the dw-ospi-nor driver for 32-bit warns about this, so fix
that.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/mtd/spi-nor/dw-ospi-nor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/spi-nor/dw-ospi-nor.c b/drivers/mtd/spi-nor/dw-ospi-nor.c
index 692c6f9b9dae..897f4f49a9f9 100644
--- a/drivers/mtd/spi-nor/dw-ospi-nor.c
+++ b/drivers/mtd/spi-nor/dw-ospi-nor.c
@@ -637,7 +637,7 @@ static void dw_spi_write(struct spi_nor *nor, loff_t to,
struct dw_spi_nor *dw_spi = nor->priv;
*retlen = 0;
- dev_dbg(dw_spi->dev, "write %ld bytes at @0x%llx\n", len, to);
+ dev_dbg(dw_spi->dev, "write %zu bytes at @0x%llx\n", len, to);
if (dw_spi_is_enhanced(nor->write_proto)) {
if (dw_spi_prep_enhanced(nor, nor->write_proto, SPI_TMOD_TO))
@@ -673,7 +673,7 @@ static int dw_spi_read(struct spi_nor *nor, loff_t from,
size_t chunk;
*retlen = 0;
- dev_dbg(nor->dev, "read %ld bytes from @0x%llx\n", len, from);
+ dev_dbg(nor->dev, "read %zu bytes from @0x%llx\n", len, from);
if (enhanced)
ret = dw_spi_prep_enhanced(nor, nor->read_proto, SPI_TMOD_RO);
--
2.39.2
More information about the barebox
mailing list