linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
@ 2014-05-16  9:38 Ted Juan
  2014-05-16  9:50 ` Gupta, Pekon
  2014-05-21 23:36 ` Brian Norris
  0 siblings, 2 replies; 12+ messages in thread
From: Ted Juan @ 2014-05-16  9:38 UTC (permalink / raw)
  To: linux-mtd@lists.infradead.org, Gupta, Pekon

The patch is mirror issue that the for-loop use the same variable.


Signed-off-by: ted.juan <ted.juan@gmail.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 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* RE: [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
  2014-05-16  9:38 Ted Juan
@ 2014-05-16  9:50 ` Gupta, Pekon
  2014-05-21 23:36 ` Brian Norris
  1 sibling, 0 replies; 12+ messages in thread
From: Gupta, Pekon @ 2014-05-16  9:50 UTC (permalink / raw)
  To: Ted Juan, computersforpeace@gmail.com; +Cc: linux-mtd@lists.infradead.org

Hi Ted,

>From: Ted Juan [mailto:ted.juan@gmail.com]
>
>The patch is mirror issue that the for-loop use the same variable.
>
>
>Signed-off-by: ted.juan <ted.juan@gmail.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 */
>--
>1.7.9.5

Thanks much for catching and fixing this..

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

Acked-by: Pekon Gupta <pekon@ti.com>


with regards, pekon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
  2014-05-16  9:38 Ted Juan
  2014-05-16  9:50 ` Gupta, Pekon
@ 2014-05-21 23:36 ` Brian Norris
  1 sibling, 0 replies; 12+ messages in thread
From: Brian Norris @ 2014-05-21 23:36 UTC (permalink / raw)
  To: Ted Juan; +Cc: linux-mtd@lists.infradead.org, Gupta, Pekon

On Fri, May 16, 2014 at 05:38:51PM +0800, Ted Juan wrote:
> The patch is mirror issue that the for-loop use the same variable.
> 
> 
> Signed-off-by: ted.juan <ted.juan@gmail.com>

Please fix your whitespace and line wrapping. I cannot apply your patch:

Applying: mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
fatal: corrupt patch at line 10
Patch failed at 0001 mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
The copy of the patch that failed is found in:
   /home/norris/git/l2-mtd/.git/rebase-apply/patch
When you have resolved this problem, run "git am --resolved".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Brian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
@ 2014-05-22  9:56 ted.juan
  0 siblings, 0 replies; 12+ messages in thread
From: ted.juan @ 2014-05-22  9:56 UTC (permalink / raw)
  To: computersforpeace; +Cc: ted.juan, linux-mtd, pekon

From: "ted.juan" <ted.juan@gmail.com>


I am sorry that I didn't use the git-send-mail last time.


Signed-off-by: ted.juan <ted.juan@gmail.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 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
       [not found] <20980858CB6D3A4BAE95CA194937D5E73EAD825F@DBDE04.ent.ti.com>
@ 2014-05-23  2:54 ` ted.juan
  2014-05-23  3:24   ` ted.juan
  2014-05-23  4:05   ` Ted Juan
  0 siblings, 2 replies; 12+ messages in thread
From: ted.juan @ 2014-05-23  2:54 UTC (permalink / raw)
  To: computersforpeace; +Cc: ted.juan, linux-mtd, pekon

From: "ted.juan" <ted.juan@gmail.com>


 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

Hi Pekon,

Thanks a lot for your comments.
I hope I don't misunderstand what you say.

CC: <stable@vger.kernel.org> # 3.13.x+
Signed-off-by: ted.juan <ted.juan@gmail.com>
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 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
  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
  2014-05-23  4:05   ` Ted Juan
  1 sibling, 1 reply; 12+ messages in thread
From: ted.juan @ 2014-05-23  3:24 UTC (permalink / raw)
  To: computersforpeace; +Cc: ted.juan, linux-mtd, pekon

From: "ted.juan" <ted_juan@weintek.com>

 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>
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 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
  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-23  4:05   ` Ted Juan
  2014-05-27  6:16     ` Gupta, Pekon
  1 sibling, 1 reply; 12+ messages in thread
From: Ted Juan @ 2014-05-23  4:05 UTC (permalink / raw)
  To: Brian Norris; +Cc: ted.juan, linux-mtd@lists.infradead.org, Gupta, Pekon

Hi Pekon,

When I add "CC: <stable@vger.kernel.org> # 3.13.x+" in patch, then git
send-email.

There are some warning message as blow. Should I fix it?
And which stable version I should mark?

Thanks.

(mbox) Adding cc: "ted.juan" <ted_juan@weintek.com> from line 'From:
"ted.juan" <ted_juan@weintek.com>'
(body) Adding cc: <stable@vger.kernel.org> # 3.13.x+ from line 'CC:
<stable@vger.kernel.org> # 3.13.x+'
Use of uninitialized value $cc in string eq at
/usr/lib/git-core/git-send-email line 983.
Use of uninitialized value $cc in quotemeta at
/usr/lib/git-core/git-send-email line 983.
W: unable to extract a valid address from: <stable@vger.kernel.org> # 3.13.x+
W: unable to extract a valid address from: <stable@vger.kernel.org> # 3.13.x+


2014-05-23 10:54 GMT+08:00 ted.juan <ted.juan@gmail.com>:
> From: "ted.juan" <ted.juan@gmail.com>
>
>
>  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
>
> Hi Pekon,
>
> Thanks a lot for your comments.
> I hope I don't misunderstand what you say.
>
> CC: <stable@vger.kernel.org> # 3.13.x+
> Signed-off-by: ted.juan <ted.juan@gmail.com>
> 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 */
> --
> 1.7.9.5
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
  2014-05-23  4:05   ` Ted Juan
@ 2014-05-27  6:16     ` Gupta, Pekon
  2014-05-28  0:46       ` Ted Juan
  0 siblings, 1 reply; 12+ messages in thread
From: Gupta, Pekon @ 2014-05-27  6:16 UTC (permalink / raw)
  To: Ted Juan; +Cc: Brian Norris, linux-mtd@lists.infradead.org

Hi Ted,

>From: Ted Juan [mailto:ted.juan@gmail.com]

>When I add "CC: <stable@vger.kernel.org> # 3.13.x+" in patch, then git
>send-email.
>
>There are some warning message as blow. Should I fix it?
>And which stable version I should mark?
>
If I'm not wrong, below is my understanding ..

Patches marked for stable are automatically pulled-in by maintainers of
stable trees when those patches get merged and tagged in linus's tree.
This is done by scripts which search "CC: <stable@vger.kernel.org> # <tag>"
in commit log of all patches. Thus "CC: <stable@vger.kernel.org> # 3.13.x+"
here is like a marker for scripts. In practice, you should not directly send
your patch to "stable@vger.kernel.org" mail-list, unless maintainer does so.

So, while sending stable patches use following command to avoid below error
'git send-email ---suppress-cc=bodycc'

Also refer:
http://lists.infradead.org/pipermail/linux-mtd/2014-May/053911.html
[2] Documentation/stable_kernel_rules.txt.


with regards, pekon

>Thanks.
>
>(mbox) Adding cc: "ted.juan" <ted_juan@weintek.com> from line 'From:
>"ted.juan" <ted_juan@weintek.com>'
>(body) Adding cc: <stable@vger.kernel.org> # 3.13.x+ from line 'CC:
><stable@vger.kernel.org> # 3.13.x+'
>Use of uninitialized value $cc in string eq at
>/usr/lib/git-core/git-send-email line 983.
>Use of uninitialized value $cc in quotemeta at
>/usr/lib/git-core/git-send-email line 983.
>W: unable to extract a valid address from: <stable@vger.kernel.org> # 3.13.x+
>W: unable to extract a valid address from: <stable@vger.kernel.org> # 3.13.x+
>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
  2014-05-27  6:16     ` Gupta, Pekon
@ 2014-05-28  0:46       ` Ted Juan
  0 siblings, 0 replies; 12+ messages in thread
From: Ted Juan @ 2014-05-28  0:46 UTC (permalink / raw)
  To: Gupta, Pekon; +Cc: Brian Norris, linux-mtd@lists.infradead.org

Hi Pekon,

Thanks for your patience to answer my question again.



> So, while sending stable patches use following command to avoid below error
> 'git send-email ---suppress-cc=bodycc'
>
> Also refer:
> http://lists.infradead.org/pipermail/linux-mtd/2014-May/053911.html
> [2] Documentation/stable_kernel_rules.txt.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
  2014-05-23  3:24   ` ted.juan
@ 2014-05-28  9:09     ` Brian Norris
  2014-05-28 14:33       ` Ted Juan
  0 siblings, 1 reply; 12+ messages in thread
From: Brian Norris @ 2014-05-28  9:09 UTC (permalink / raw)
  To: ted.juan; +Cc: ted.juan, linux-mtd, pekon

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
  2014-05-28  9:09     ` Brian Norris
@ 2014-05-28 14:33       ` Ted Juan
  2014-05-28 20:18         ` Brian Norris
  0 siblings, 1 reply; 12+ messages in thread
From: Ted Juan @ 2014-05-28 14:33 UTC (permalink / raw)
  To: computersforpeace; +Cc: Ted Juan, linux-mtd, pekon

Hi Brian,

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

ok, this should fix it.

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

ok, thank you.


 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>
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 cbe87a8..f0ed92e 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1180,7 +1180,7 @@ static int __maybe_unused omap_calculate_ecc_bch(struct mtd_info *mtd,
 	u8 *ecc_code;
 	unsigned long nsectors, bch_val1, bch_val2, bch_val3, bch_val4;
 	u32 val;
-	int i;
+	int i, j;
 
 	nsectors = ((readl(info->reg.gpmc_ecc_config) >> 4) & 0x7) + 1;
 	for (i = 0; i < nsectors; i++) {
@@ -1263,8 +1263,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 */
@@ -1273,8 +1273,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 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] mtd: nand: omap: fix omap_calculate_ecc_bch() for-loop error
  2014-05-28 14:33       ` Ted Juan
@ 2014-05-28 20:18         ` Brian Norris
  0 siblings, 0 replies; 12+ messages in thread
From: Brian Norris @ 2014-05-28 20:18 UTC (permalink / raw)
  To: Ted Juan; +Cc: linux-mtd, pekon

Hi Ted,

On Wed, May 28, 2014 at 10:33:06PM +0800, Ted Juan wrote:
> >>Sorry, this patch does not apply to l2-mtd.git. I think it conflicts
> >>with some recent changes from Pekon. Please rebase and resend.
> 
> ok, this should fix it.

This is better. It still doesn't work out perfectly, since you included
this conversation within the commit area. In the future, you might try
testing your email by applying using 'git am' to your own tree first,
just to see how it looks.

> >>Can you format your name properly, without the dot, for proper
> >>authorship attribution?
> 
> ok, thank you.
> 
> 
>  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>
> Acked-by: Pekon Gupta <pekon@ti.com>

I fixed up the commit message slightly and pushed to l2-mtd.git. Thanks!

> ---
>  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 cbe87a8..f0ed92e 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -1180,7 +1180,7 @@ static int __maybe_unused omap_calculate_ecc_bch(struct mtd_info *mtd,
>  	u8 *ecc_code;
>  	unsigned long nsectors, bch_val1, bch_val2, bch_val3, bch_val4;
>  	u32 val;
> -	int i;
> +	int i, j;
>  
>  	nsectors = ((readl(info->reg.gpmc_ecc_config) >> 4) & 0x7) + 1;
>  	for (i = 0; i < nsectors; i++) {
> @@ -1263,8 +1263,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 */
> @@ -1273,8 +1273,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 */

Brian

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-05-28 20:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).