Skip to content

Commit 47570bb

Browse files
Roncomputersforpeace
authored andcommitted
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>
1 parent 9fd6c6c commit 47570bb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/mtd/nand/nand_base.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,8 +1204,7 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip,
12041204
* ecc.pos. Let's make sure that there are no gaps in ECC positions.
12051205
*/
12061206
for (i = 0; i < eccfrag_len - 1; i++) {
1207-
if (eccpos[i + start_step * chip->ecc.bytes] + 1 !=
1208-
eccpos[i + start_step * chip->ecc.bytes + 1]) {
1207+
if (eccpos[i + index] + 1 != eccpos[i + index + 1]) {
12091208
gaps = 1;
12101209
break;
12111210
}

0 commit comments

Comments
 (0)