[U-Boot] [PATCH V3] nand_spl_simple: store ecc data on the stack

Scott Wood
2011-12-13T18:47:42Z

On 12/13/2011 11:50 AM, Stefano Babic wrote:
> /* Pick the ECC bytes out of the oob data */
> - for (i = 0; i < CONFIG_SYS_NAND_ECCTOTAL; i++)
> + for (i = 0; i < (SYS_NAND_ECCTOTAL); i++)
> ecc_code[i] = oob_data[nand_ecc_pos[i]];
[snip]
> @@ -213,10 +203,10 @@ static int nand_read_page(int block, int page, void *dst)
> this->read_buf(&mtd, oob_data, CONFIG_SYS_NAND_OOBSIZE);
>
> /* Pick the ECC bytes out of the oob data */
> - for (i = 0; i < CONFIG_SYS_NAND_ECCTOTAL; i++)
> + for (i = 0; i < (SYS_NAND_ECCTOTAL); i++)

No need for parens around SYS_NAND_ECCTOTAL.

-Scott