aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHeinrich Schuchardt2022-04-25 23:01:44 +0200
committerTom Rini2022-05-05 15:06:02 -0400
commit6d81319728c6a20b3e6d3dc828cb351fb5dcb1c6 (patch)
tree3331f8ad4c9548db14dfe2eb573e835a7fc0f20b /cmd
parent54d24d72601321f4470c4edf31c6b29adae424a7 (diff)
cmd: onenand: fix printf codes
For printing size_t use %zu or %zx. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/onenand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/onenand.c b/cmd/onenand.c
index 592985a7ee3..d633f19d3bb 100644
--- a/cmd/onenand.c
+++ b/cmd/onenand.c
@@ -53,7 +53,7 @@ static int arg_off_size_onenand(int argc, char *const argv[], ulong *off,
if (*size == mtd->size)
puts("whole chip\n");
else
- printf("offset 0x%lx, size 0x%x\n", *off, *size);
+ printf("offset 0x%lx, size 0x%zx\n", *off, *size);
return 0;
}
@@ -401,7 +401,7 @@ static int do_onenand_read(struct cmd_tbl *cmdtp, int flag, int argc,
ret = onenand_block_read(ofs, len, &retlen, (u8 *)addr, oob);
- printf(" %d bytes read: %s\n", retlen, ret ? "ERROR" : "OK");
+ printf(" %zu bytes read: %s\n", retlen, ret ? "ERROR" : "OK");
return ret == 0 ? 0 : 1;
}
@@ -428,7 +428,7 @@ static int do_onenand_write(struct cmd_tbl *cmdtp, int flag, int argc,
ret = onenand_block_write(ofs, len, &retlen, (u8 *)addr, withoob);
- printf(" %d bytes written: %s\n", retlen, ret ? "ERROR" : "OK");
+ printf(" %zu bytes written: %s\n", retlen, ret ? "ERROR" : "OK");
return ret == 0 ? 0 : 1;
}