Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ron and committed by
Brian Norris
47570bb1 9fd6c6c1

+1 -2
+1 -2
drivers/mtd/nand/nand_base.c
··· 1204 1204 * ecc.pos. Let's make sure that there are no gaps in ECC positions. 1205 1205 */ 1206 1206 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]) { 1209 1208 gaps = 1; 1210 1209 break; 1211 1210 }