Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176918
b: refs/heads/master
c: f54d633
h: refs/heads/master
v: v3
  • Loading branch information
Akinobu Mita authored and David Woodhouse committed Oct 17, 2009
1 parent 58af254 commit 1bcaf59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 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: 5a134239e707b23c65948f41f40b828d40e440af
refs/heads/master: f54d6336372b97d3624d1c5c179b2dd062472bd1
18 changes: 4 additions & 14 deletions trunk/drivers/mtd/tests/mtd_oobtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ static int scan_for_bad_eraseblocks(void)
printk(PRINT_PREF "error: cannot allocate memory\n");
return -ENOMEM;
}
memset(bbt, 0 , ebcnt);

printk(PRINT_PREF "scanning for bad eraseblocks\n");
for (i = 0; i < ebcnt; ++i) {
Expand Down Expand Up @@ -392,7 +391,6 @@ static int __init mtd_oobtest_init(void)
mtd->writesize, ebcnt, pgcnt, mtd->oobsize);

err = -ENOMEM;
mtd->erasesize = mtd->erasesize;
readbuf = kmalloc(mtd->erasesize, GFP_KERNEL);
if (!readbuf) {
printk(PRINT_PREF "error: cannot allocate memory\n");
Expand Down Expand Up @@ -476,18 +474,10 @@ static int __init mtd_oobtest_init(void)
use_len_max = mtd->ecclayout->oobavail;
vary_offset = 1;
simple_srand(5);
printk(PRINT_PREF "writing OOBs of whole device\n");
for (i = 0; i < ebcnt; ++i) {
if (bbt[i])
continue;
err = write_eraseblock(i);
if (err)
goto out;
if (i % 256 == 0)
printk(PRINT_PREF "written up to eraseblock %u\n", i);
cond_resched();
}
printk(PRINT_PREF "written %u eraseblocks\n", i);

err = write_whole_device();
if (err)
goto out;

/* Check all eraseblocks */
use_offset = 0;
Expand Down

0 comments on commit 1bcaf59

Please sign in to comment.