On Fri, Oct 18, 2013 at 05:46:31PM +0800, Wu, Josh wrote:
> @@ -840,6 +841,13 @@ static int atmel_pmecc_nand_init_params(struct nand_chip 
> *nand,
>               nand->ecc.steps = 1;
>               nand->ecc.bytes = host->pmecc_bytes_per_sector *
>                                      host->pmecc_sector_number;
> +
> +             if (nand->ecc.bytes > MTD_MAX_ECCPOS_ENTRIES_LARGE) {
> +                     dev_err(host->dev, "too large eccpos entries. max 
> support ecc.bytes is %d\n",
> +                                     MTD_MAX_ECCPOS_ENTRIES_LARGE);
> +                     return -EINVAL;
> +             }

I won't hold up acceptance over this, but wouldn't it be more useful to
show the actual ecc.bytes rather than the constant limit which could be
easily looked up in the source?  Or better, print both.

-Scott

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to