Skip to contentSkip to conversation

nand_util.c: Use '%ld' for length in nand_unlock debug print

PATCH New Tom Rini 1 participant 2 messages Dec 16, 2013

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 nand_util.c: Use '%ld' for length in nand_unlock debug print

length is size_t so needs to be '%ld' not '%d' to avoid warnings.

---
 drivers/mtd/nand/nand_util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/nand_util.c +1 -1
index eeaa7e8..119355a 100644
@@ -315,7 +315,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t start, size_t length,
 	int page;
 	struct nand_chip *chip = mtd->priv;
 
-	debug("nand_unlock%s: start: %08llx, length: %d!\n",
+	debug("nand_unlock%s: start: %08llx, length: %ld!\n",
 		allexcept ? " (allexcept)" : "", start, length);
 
 	/* select the NAND device */
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/1 nand_util.c: Use '%ld' for length in nand_unlock debug print

Quoted 13 lines · Tom Rini

length is size_t so needs to be '%ld' not '%d' to avoid warnings.

---
 drivers/mtd/nand/nand_util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/nand_util.c +0 -0
index eeaa7e8..119355a 100644

drivers/mtd/nand/nand_util.c int nand_unlock(struct mtd_info *mtd, loff_t start, size_t length, · line 321

Quoted 8 lines
drivers/mtd/nand/nand_util.c +1 -1
@@ -315,7 +315,7 @@ int nand_unlock(struct mtd_info *mtd, loff_t start, size_t length,
 	int page;
 	struct nand_chip *chip = mtd->priv;
 
-	debug("nand_unlock%s: start: %08llx, length: %d!\n",
+	debug("nand_unlock%s: start: %08llx, length: %ld!\n",
 		allexcept ? " (allexcept)" : "", start, length);
 
 	/* select the NAND device */

Bah, that's not the right portable identifier for size_t, redoing..

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131216/88c792ba/attachment.pgp>