summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@nokia.com>2010-09-23 13:51:36 +0200
committerChris Ball <cjb@laptop.org>2010-10-23 15:11:13 +0200
commitc27d37aed0ba9159c34747b2e1e2c3eddac454f8 (patch)
treef15b2d2164b613f5a83a8c1a173726a38b898c54 /drivers
parentmmc_test: fix memory allocation segment limits (diff)
downloadlinux-c27d37aed0ba9159c34747b2e1e2c3eddac454f8.tar.xz
linux-c27d37aed0ba9159c34747b2e1e2c3eddac454f8.zip
mmc_test: fix display of .5 KiB
Append .5 to KiB display when there are an odd number of sectors. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/card/mmc_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index 5874040b3702..c38a3a84a455 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -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);