提交 c27d37ae 编写于 作者: A Adrian Hunter 提交者: Chris Ball

mmc_test: fix display of .5 KiB

Append .5 to KiB display when there are an odd number of sectors.
Signed-off-by: NAdrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 3d203be8
......@@ -539,7 +539,7 @@ static void mmc_test_print_rate(struct mmc_test_card *test, uint64_t bytes,
printk(KERN_INFO "%s: Transfer of %u sectors (%u%s KiB) took %lu.%09lu "
"seconds (%u kB/s, %u KiB/s)\n",
mmc_hostname(test->card->host), sectors, sectors >> 1,
(sectors == 1 ? ".5" : ""), (unsigned long)ts.tv_sec,
(sectors & 1 ? ".5" : ""), (unsigned long)ts.tv_sec,
(unsigned long)ts.tv_nsec, rate / 1000, rate / 1024);
mmc_test_save_transfer_result(test, 1, sectors, ts, rate);
......@@ -563,7 +563,7 @@ static void mmc_test_print_avg_rate(struct mmc_test_card *test, uint64_t bytes,
printk(KERN_INFO "%s: Transfer of %u x %u sectors (%u x %u%s KiB) took "
"%lu.%09lu seconds (%u kB/s, %u KiB/s)\n",
mmc_hostname(test->card->host), count, sectors, count,
sectors >> 1, (sectors == 1 ? ".5" : ""),
sectors >> 1, (sectors & 1 ? ".5" : ""),
(unsigned long)ts.tv_sec, (unsigned long)ts.tv_nsec,
rate / 1000, rate / 1024);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册