提交 47570bb1 编写于 作者: R Ron 提交者: Brian Norris

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: NRon Lee <ron@debian.org>
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
上级 9fd6c6c1
...@@ -1204,8 +1204,7 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, ...@@ -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. * ecc.pos. Let's make sure that there are no gaps in ECC positions.
*/ */
for (i = 0; i < eccfrag_len - 1; i++) { for (i = 0; i < eccfrag_len - 1; i++) {
if (eccpos[i + start_step * chip->ecc.bytes] + 1 != if (eccpos[i + index] + 1 != eccpos[i + index + 1]) {
eccpos[i + start_step * chip->ecc.bytes + 1]) {
gaps = 1; gaps = 1;
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册