Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116037
b: refs/heads/master
c: ecd5b31
h: refs/heads/master
i:
  116035: 37c8e2a
v: v3
  • Loading branch information
Richard Purdie authored and David Woodhouse committed Oct 18, 2008
1 parent 4611b14 commit 778113b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: a52c8afdd035a72da55756d5e7f9fb35cc62dcf5
refs/heads/master: ecd5b3102322011610a2521c389ab5804c811837
6 changes: 3 additions & 3 deletions trunk/drivers/mtd/mtdoops.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void mtdoops_inc_counter(struct mtdoops_context *cxt)
int ret;

cxt->nextpage++;
if (cxt->nextpage > cxt->oops_pages)
if (cxt->nextpage >= cxt->oops_pages)
cxt->nextpage = 0;
cxt->nextcount++;
if (cxt->nextcount == 0xffffffff)
Expand Down Expand Up @@ -141,7 +141,7 @@ static void mtdoops_workfunc_erase(struct work_struct *work)
mod = (cxt->nextpage * OOPS_PAGE_SIZE) % mtd->erasesize;
if (mod != 0) {
cxt->nextpage = cxt->nextpage + ((mtd->erasesize - mod) / OOPS_PAGE_SIZE);
if (cxt->nextpage > cxt->oops_pages)
if (cxt->nextpage >= cxt->oops_pages)
cxt->nextpage = 0;
}

Expand All @@ -158,7 +158,7 @@ static void mtdoops_workfunc_erase(struct work_struct *work)
cxt->nextpage * OOPS_PAGE_SIZE);
i++;
cxt->nextpage = cxt->nextpage + (mtd->erasesize / OOPS_PAGE_SIZE);
if (cxt->nextpage > cxt->oops_pages)
if (cxt->nextpage >= cxt->oops_pages)
cxt->nextpage = 0;
if (i == (cxt->oops_pages / (mtd->erasesize / OOPS_PAGE_SIZE))) {
printk(KERN_ERR "mtdoops: All blocks bad!\n");
Expand Down

0 comments on commit 778113b

Please sign in to comment.