mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 23:45:31 +08:00
mtd: nand: use the nand_read_subpage index everywhere
Now that the index variable is correctly set earlier in this function we can use it in other places that compute the same thing too. Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
parent
9fd6c6c18c
commit
47570bb1f5
@ -1204,8 +1204,7 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip,
|
||||
* ecc.pos. Let's make sure that there are no gaps in ECC positions.
|
||||
*/
|
||||
for (i = 0; i < eccfrag_len - 1; i++) {
|
||||
if (eccpos[i + start_step * chip->ecc.bytes] + 1 !=
|
||||
eccpos[i + start_step * chip->ecc.bytes + 1]) {
|
||||
if (eccpos[i + index] + 1 != eccpos[i + index + 1]) {
|
||||
gaps = 1;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user