Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176947
b: refs/heads/master
c: 54c69cc
h: refs/heads/master
i:
  176945: 9140741
  176943: 8c068bf
v: v3
  • Loading branch information
Akinobu Mita authored and David Woodhouse committed Nov 30, 2009
1 parent 2af2fe6 commit 58b7f7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 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: e670e41ae0f329487e5a5c357510c6798b0d80b4
refs/heads/master: 54c69cc25064c1d333a12b5883aaa3bfa3041dee
11 changes: 1 addition & 10 deletions trunk/drivers/mtd/nand/alauda.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,6 @@ static int alauda_read_oob(struct mtd_info *mtd, loff_t from, void *oob)
return __alauda_read_page(mtd, from, ignore_buf, oob);
}

static int popcount8(u8 c)
{
int ret = 0;

for ( ; c; c>>=1)
ret += c & 1;
return ret;
}

static int alauda_isbad(struct mtd_info *mtd, loff_t ofs)
{
u8 oob[16];
Expand All @@ -391,7 +382,7 @@ static int alauda_isbad(struct mtd_info *mtd, loff_t ofs)
return err;

/* A block is marked bad if two or more bits are zero */
return popcount8(oob[5]) >= 7 ? 0 : 1;
return hweight8(oob[5]) >= 7 ? 0 : 1;
}

static int alauda_bounce_read(struct mtd_info *mtd, loff_t from, size_t len,
Expand Down

0 comments on commit 58b7f7b

Please sign in to comment.