Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: "ted.juan" <ted.juan@gmail.com>
Cc: "ted.juan" <ted_juan@weintek.com>,
	linux-mtd@lists.infradead.org, pekon@ti.com
Subject: Re: [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
Date: Wed, 28 May 2014 02:09:33 -0700	[thread overview]
Message-ID: <20140528090933.GD4285@norris-Latitude-E6410> (raw)
In-Reply-To: <1400815474-7871-1-git-send-email-ted.juan@gmail.com>

Hi Ted,

Sorry, this patch does not apply to l2-mtd.git. I think it conflicts
with some recent changes from Pekon. Please rebase and resend.

On Fri, May 23, 2014 at 11:24:34AM +0800, ted.juan wrote:
> From: "ted.juan" <ted_juan@weintek.com>

Can you format your name properly, without the dot, for proper
authorship attribution?

> 
>  Fixes:  2c9f2365d1e1d0e318b068f683f18c99515b80f8
>  mtd: nand: omap: ecc.calculate: merge omap3_calculate_ecc_bch4 in omap_calculate_ecc_bch
> 
>  Fixes: 7bcd1dca1d587ad29f9825ba4414620440e8c8da
>  mtd: nand: omap: ecc.calculate: merge omap3_calculate_ecc_bch8 in omap_calculate_ecc_bch
> 
> CC: <stable@vger.kernel.org> # 3.13.x+
> Signed-off-by: ted.juan <ted.juan@gmail.com>

Same here.

> Acked-by: Pekon Gupta <pekon@ti.com>
> ---
>  drivers/mtd/nand/omap2.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index 1ff49b8..e21145a 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -1162,7 +1162,7 @@ static int __maybe_unused omap_calculate_ecc_bch(struct mtd_info *mtd,
>  	struct gpmc_nand_regs	*gpmc_regs = &info->reg;
>  	u8 *ecc_code;
>  	unsigned long nsectors, bch_val1, bch_val2, bch_val3, bch_val4;
> -	int i;
> +	int i, j;
>  
>  	nsectors = ((readl(info->reg.gpmc_ecc_config) >> 4) & 0x7) + 1;
>  	for (i = 0; i < nsectors; i++) {
> @@ -1210,8 +1210,8 @@ static int __maybe_unused omap_calculate_ecc_bch(struct mtd_info *mtd,
>  		case OMAP_ECC_BCH4_CODE_HW_DETECTION_SW:
>  			/* Add constant polynomial to remainder, so that
>  			 * ECC of blank pages results in 0x0 on reading back */
> -			for (i = 0; i < eccbytes; i++)
> -				ecc_calc[i] ^= bch4_polynomial[i];
> +			for (j = 0; j < eccbytes; j++)
> +				ecc_calc[j] ^= bch4_polynomial[j];
>  			break;
>  		case OMAP_ECC_BCH4_CODE_HW:
>  			/* Set  8th ECC byte as 0x0 for ROM compatibility */
> @@ -1220,8 +1220,8 @@ static int __maybe_unused omap_calculate_ecc_bch(struct mtd_info *mtd,
>  		case OMAP_ECC_BCH8_CODE_HW_DETECTION_SW:
>  			/* Add constant polynomial to remainder, so that
>  			 * ECC of blank pages results in 0x0 on reading back */
> -			for (i = 0; i < eccbytes; i++)
> -				ecc_calc[i] ^= bch8_polynomial[i];
> +			for (j = 0; j < eccbytes; j++)
> +				ecc_calc[j] ^= bch8_polynomial[j];
>  			break;
>  		case OMAP_ECC_BCH8_CODE_HW:
>  			/* Set 14th ECC byte as 0x0 for ROM compatibility */

Thanks,
Brian

  reply	other threads:[~2014-05-28  9:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20980858CB6D3A4BAE95CA194937D5E73EAD825F@DBDE04.ent.ti.com>
2014-05-23  2:54 ` [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error ted.juan
2014-05-23  3:24   ` ted.juan
2014-05-28  9:09     ` Brian Norris [this message]
2014-05-28 14:33       ` Ted Juan
2014-05-28 20:18         ` Brian Norris
2014-05-23  4:05   ` Ted Juan
2014-05-27  6:16     ` Gupta, Pekon
2014-05-28  0:46       ` Ted Juan
2014-05-22  9:56 ted.juan
  -- strict thread matches above, loose matches on Subject: below --
2014-05-16  9:38 Ted Juan
2014-05-16  9:50 ` Gupta, Pekon
2014-05-21 23:36 ` Brian Norris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140528090933.GD4285@norris-Latitude-E6410 \
    --to=computersforpeace@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=pekon@ti.com \
    --cc=ted.juan@gmail.com \
    --cc=ted_juan@weintek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox