Patchwork MTD: atmel_nand: using a stronger ECC is not dangerous

login
register
mail settings
Submitter Richard Genoud
Date May 31, 2013, 2:34 p.m.
Message ID <1370010850-20860-1-git-send-email-richard.genoud@gmail.com>
Download mbox | patch
Permalink /patch/247969/
State Accepted
Commit f666d6495a4350ebe4ebb8c071b290f9f49514bf
Headers show

Comments

Richard Genoud - May 31, 2013, 2:34 p.m.
We don't have to issue a warning when a stronger error correting
capability is chosen.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
 drivers/mtd/nand/atmel_nand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Wu, Josh - June 3, 2013, 5:44 a.m.
On 5/31/2013 10:34 PM, Richard Genoud wrote:
> We don't have to issue a warning when a stronger error correting
> capability is chosen.
>
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>

Acked-by: Josh Wu <josh.wu@atmel.com>

Best Regards,
Josh Wu

> ---
>   drivers/mtd/nand/atmel_nand.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
> index 2d23d29..2415cdc 100644
> --- a/drivers/mtd/nand/atmel_nand.c
> +++ b/drivers/mtd/nand/atmel_nand.c
> @@ -1002,7 +1002,7 @@ static int __init atmel_pmecc_nand_init_params(struct platform_device *pdev,
>   		return err_no;
>   	}
>   
> -	if (cap != host->pmecc_corr_cap ||
> +	if (cap > host->pmecc_corr_cap ||
>   			sector_size != host->pmecc_sector_size)
>   		dev_info(host->dev, "WARNING: Be Caution! Using different PMECC parameters from Nand ONFI ECC reqirement.\n");
>

Patch

diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 2d23d29..2415cdc 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -1002,7 +1002,7 @@  static int __init atmel_pmecc_nand_init_params(struct platform_device *pdev,
 		return err_no;
 	}
 
-	if (cap != host->pmecc_corr_cap ||
+	if (cap > host->pmecc_corr_cap ||
 			sector_size != host->pmecc_sector_size)
 		dev_info(host->dev, "WARNING: Be Caution! Using different PMECC parameters from Nand ONFI ECC reqirement.\n");