Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242776
b: refs/heads/master
c: e70727e
h: refs/heads/master
v: v3
  • Loading branch information
David Lambert authored and David Woodhouse committed Mar 11, 2011
1 parent 46fd721 commit 0cc9eda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d9d9936209e589569a97985285b3282310cf2db
refs/heads/master: e70727e442eb61581f836a9a0ca0c3b70d8a3ff2
14 changes: 7 additions & 7 deletions trunk/drivers/mtd/tests/mtd_speedtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,16 @@ static inline void stop_timing(void)

static long calc_speed(void)
{
long ms, k, speed;
uint64_t k;
long ms;

ms = (finish.tv_sec - start.tv_sec) * 1000 +
(finish.tv_usec - start.tv_usec) / 1000;
k = goodebcnt * mtd->erasesize / 1024;
if (ms)
speed = (k * 1000) / ms;
else
speed = 0;
return speed;
if (ms == 0)
return 0;
k = goodebcnt * (mtd->erasesize / 1024) * 1000;
do_div(k, ms);
return k;
}

static int scan_for_bad_eraseblocks(void)
Expand Down

0 comments on commit 0cc9eda

Please sign in to comment.