[U-Boot] [PATCH 03/10] mtd: nand: s3c: Fix data type width in debug()

Marek Vasut marex at denx.de
Sat Oct 11 18:42:51 CEST 2014


Printing u32 with %02x is just a bad idea, fix it.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Kyungmin Park <kyungmin.park at samsung.com>
Cc: Lukasz Majewski <l.majewski at samsung.com>
Cc: Minkyu Kang <mk7.kang at samsung.com>
Cc: Scott Wood <scottwood at freescale.com>
Cc: Vladimir Zapolskiy <vz at mleia.com>
---
 drivers/mtd/nand/s3c2410_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c
index db87d07..399f2bc 100644
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ b/drivers/mtd/nand/s3c2410_nand.c
@@ -43,7 +43,7 @@ static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 	struct nand_chip *chip = mtd->priv;
 	struct s3c2410_nand *nand = s3c2410_get_base_nand();
 
-	debug("hwcontrol(): 0x%02x 0x%02x\n", cmd, ctrl);
+	debug("hwcontrol(): 0x%02x 0x%08x\n", cmd & 0xff, ctrl);
 
 	if (ctrl & NAND_CTRL_CHANGE) {
 		ulong IO_ADDR_W = (ulong)nand;
-- 
2.1.1



More information about the U-Boot mailing list