From 525c32976b7161fabb8e4a85a94d3948124065a9 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 17 Jul 2013 13:08:40 +0200 Subject: [PATCH] software/memtest: fix bandwidth computation --- software/memtest/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/software/memtest/main.c b/software/memtest/main.c index 8e7bcdd98..3e03b129f 100644 --- a/software/memtest/main.c +++ b/software/memtest/main.c @@ -20,9 +20,9 @@ static void membw_service(void) nr = lasmicon_bandwidth_nreads_read(); nw = lasmicon_bandwidth_nwrites_read(); f = identifier_frequency_read(); - rdb = nr*f >> (24 - 7); - wrb = nw*f >> (24 - 7); - printf("read:%4dMbps write:%4dMbps all:%4dMbps\n", rdb/1000000, wrb/1000000, (rdb + wrb)/1000000); + rdb = (nr*f >> (24 - 7))/1000000ULL; + wrb = (nw*f >> (24 - 7))/1000000ULL; + printf("read:%5dMbps write:%5dMbps all:%5dMbps\n", rdb, wrb, rdb + wrb); } }