Skip to contentSkip to conversation

cmd: sf: use correct printf code

PATCH New Heinrich Schuchardt 3 participants 3 messages Jan 6, 2019 – Jan 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: sf: use correct printf code

test->time_ms[] is defined as unsigned. So use %u for printf().

---
 cmd/sf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/sf.c +1 -1
index 84bb0575f2..738ef0e46d 100644
@@ -413,7 +413,7 @@ static void show_time(struct test_info *test, int stage)
 		do_div(speed, test->time_ms[stage] * 1024);
 	bps = speed * 8;
 
-	printf("%d %s: %d ticks, %d KiB/s %d.%03d Mbps\n", stage,
+	printf("%d %s: %u ticks, %d KiB/s %d.%03d Mbps\n", stage,
 	       stage_name[stage], test->time_ms[stage],
 	       (int)speed, bps / 1000, bps % 1000);
 }
Signature · 1 line
2.20.1
#2 lore raw

PATCH 1/1 cmd: sf: use correct printf code

In reply to Heinrich Schuchardt
Quoted 4 lines · Heinrich Schuchardt

test->time_ms[] is defined as unsigned. So use %u for printf().

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190115/c49a49b4/attachment.sig>