Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165450
b: refs/heads/master
c: c6f7e7b
h: refs/heads/master
v: v3
  • Loading branch information
Roel Kluin authored and David Woodhouse committed Sep 4, 2009
1 parent a200d39 commit 6d37083
Show file tree
Hide file tree
Showing 3 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: 269c0ee66367b11de9758ee64ea039843f0c7cad
refs/heads/master: c6f7e7beb9e6a64816f534a3a0dd0cfa4937f1fe
2 changes: 1 addition & 1 deletion trunk/drivers/mtd/tests/mtd_oobtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ static int __init mtd_oobtest_init(void)
goto out;

addr0 = 0;
for (i = 0; bbt[i] && i < ebcnt; ++i)
for (i = 0; i < ebcnt && bbt[i]; ++i)
addr0 += mtd->erasesize;

/* Attempt to write off end of OOB */
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/mtd/tests/mtd_pagetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ static int verify_eraseblock(int ebnum)
loff_t addr = ebnum * mtd->erasesize;

addr0 = 0;
for (i = 0; bbt[i] && i < ebcnt; ++i)
for (i = 0; i < ebcnt && bbt[i]; ++i)
addr0 += mtd->erasesize;

addrn = mtd->size;
for (i = 0; bbt[ebcnt - i - 1] && i < ebcnt; ++i)
for (i = 0; i < ebcnt && bbt[ebcnt - i - 1]; ++i)
addrn -= mtd->erasesize;

set_random_data(writebuf, mtd->erasesize);
Expand Down Expand Up @@ -219,11 +219,11 @@ static int crosstest(void)
memset(pp1, 0, pgsize * 4);

addr0 = 0;
for (i = 0; bbt[i] && i < ebcnt; ++i)
for (i = 0; i < ebcnt && bbt[i]; ++i)
addr0 += mtd->erasesize;

addrn = mtd->size;
for (i = 0; bbt[ebcnt - i - 1] && i < ebcnt; ++i)
for (i = 0; i < ebcnt && bbt[ebcnt - i - 1]; ++i)
addrn -= mtd->erasesize;

/* Read 2nd-to-last page to pp1 */
Expand Down Expand Up @@ -317,7 +317,7 @@ static int erasecrosstest(void)

ebnum = 0;
addr0 = 0;
for (i = 0; bbt[i] && i < ebcnt; ++i) {
for (i = 0; i < ebcnt && bbt[i]; ++i) {
addr0 += mtd->erasesize;
ebnum += 1;
}
Expand Down Expand Up @@ -413,7 +413,7 @@ static int erasetest(void)

ebnum = 0;
addr0 = 0;
for (i = 0; bbt[i] && i < ebcnt; ++i) {
for (i = 0; i < ebcnt && bbt[i]; ++i) {
addr0 += mtd->erasesize;
ebnum += 1;
}
Expand Down

0 comments on commit 6d37083

Please sign in to comment.