mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] mtd: spi-nor: fix format specifier in debug message
Date: Thu,  1 Feb 2024 00:03:47 +0100	[thread overview]
Message-ID: <20240131230347.1747216-1-a.fatoum@pengutronix.de> (raw)

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@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




             reply	other threads:[~2024-01-31 23:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 23:03 Ahmad Fatoum [this message]
2024-02-01 15:09 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240131230347.1747216-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox