All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: tests: fix regression introduced in mtd_nandectest
@ 2016-03-01 21:04 Jorge Ramirez-Ortiz
  2016-03-01 21:17 ` Boris Brezillon
  0 siblings, 1 reply; 4+ messages in thread
From: Jorge Ramirez-Ortiz @ 2016-03-01 21:04 UTC (permalink / raw
  To: jorge.ramirez-ortiz, boris.brezillon, fcooper, computersforpeace
  Cc: linux-mtd, daniel.thompson, xiaolei.li

Offending Commit: 6e94119 "mtd: nand: return consistent error codes in
ecc.correct() implementations"

The new error code was not being handled properly in double bit error
detection.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
---
 drivers/mtd/tests/mtd_nandecctest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c
index 7931615..88b6c81 100644
--- a/drivers/mtd/tests/mtd_nandecctest.c
+++ b/drivers/mtd/tests/mtd_nandecctest.c
@@ -187,7 +187,7 @@ static int double_bit_error_detect(void *error_data, void *error_ecc,
 	__nand_calculate_ecc(error_data, size, calc_ecc);
 	ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size);
 
-	return (ret == -1) ? 0 : -EINVAL;
+	return (ret == -EBADMSG) ? 0 : -EINVAL;
 }
 
 static const struct nand_ecc_test nand_ecc_test[] = {
-- 
2.1.4

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

* Re: [PATCH] mtd: nand: tests: fix regression introduced in mtd_nandectest
  2016-03-01 21:04 [PATCH] mtd: nand: tests: fix regression introduced in mtd_nandectest Jorge Ramirez-Ortiz
@ 2016-03-01 21:17 ` Boris Brezillon
  2016-03-02 15:50   ` Franklin S Cooper Jr.
  0 siblings, 1 reply; 4+ messages in thread
From: Boris Brezillon @ 2016-03-01 21:17 UTC (permalink / raw
  To: Jorge Ramirez-Ortiz
  Cc: fcooper, computersforpeace, linux-mtd, daniel.thompson,
	xiaolei.li

Hi Jorge,

On Tue,  1 Mar 2016 16:04:00 -0500
Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> wrote:

> Offending Commit: 6e94119 "mtd: nand: return consistent error codes in
> ecc.correct() implementations"
> 
> The new error code was not being handled properly in double bit error
> detection.
> 
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>

Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>

Thanks,

Boris

> ---
>  drivers/mtd/tests/mtd_nandecctest.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c
> index 7931615..88b6c81 100644
> --- a/drivers/mtd/tests/mtd_nandecctest.c
> +++ b/drivers/mtd/tests/mtd_nandecctest.c
> @@ -187,7 +187,7 @@ static int double_bit_error_detect(void *error_data, void *error_ecc,
>  	__nand_calculate_ecc(error_data, size, calc_ecc);
>  	ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size);
>  
> -	return (ret == -1) ? 0 : -EINVAL;
> +	return (ret == -EBADMSG) ? 0 : -EINVAL;
>  }
>  
>  static const struct nand_ecc_test nand_ecc_test[] = {



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* Re: [PATCH] mtd: nand: tests: fix regression introduced in mtd_nandectest
  2016-03-01 21:17 ` Boris Brezillon
@ 2016-03-02 15:50   ` Franklin S Cooper Jr.
  2016-03-05  1:02     ` Brian Norris
  0 siblings, 1 reply; 4+ messages in thread
From: Franklin S Cooper Jr. @ 2016-03-02 15:50 UTC (permalink / raw
  To: Boris Brezillon
  Cc: computersforpeace, linux-mtd, daniel.thompson, xiaolei.li,
	Jorge Ramirez-Ortiz



On 03/01/2016 03:17 PM, Boris Brezillon wrote:
> Hi Jorge,
>
> On Tue,  1 Mar 2016 16:04:00 -0500
> Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> wrote:
>
>> Offending Commit: 6e94119 "mtd: nand: return consistent error codes in
>> ecc.correct() implementations"
>>
>> The new error code was not being handled properly in double bit error
>> detection.
>>
>> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
>
> Thanks,
>
> Boris

We just encountered this problem and this patch fixed it.
Tested-by: Franklin S Cooper Jr <fcooper@ti.com>
>> ---
>>  drivers/mtd/tests/mtd_nandecctest.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c
>> index 7931615..88b6c81 100644
>> --- a/drivers/mtd/tests/mtd_nandecctest.c
>> +++ b/drivers/mtd/tests/mtd_nandecctest.c
>> @@ -187,7 +187,7 @@ static int double_bit_error_detect(void *error_data, void *error_ecc,
>>  	__nand_calculate_ecc(error_data, size, calc_ecc);
>>  	ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size);
>>  
>> -	return (ret == -1) ? 0 : -EINVAL;
>> +	return (ret == -EBADMSG) ? 0 : -EINVAL;
>>  }
>>  
>>  static const struct nand_ecc_test nand_ecc_test[] = {
>
>

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

* Re: [PATCH] mtd: nand: tests: fix regression introduced in mtd_nandectest
  2016-03-02 15:50   ` Franklin S Cooper Jr.
@ 2016-03-05  1:02     ` Brian Norris
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Norris @ 2016-03-05  1:02 UTC (permalink / raw
  To: Franklin S Cooper Jr.
  Cc: Boris Brezillon, linux-mtd, daniel.thompson, xiaolei.li,
	Jorge Ramirez-Ortiz

On Wed, Mar 02, 2016 at 09:50:19AM -0600, Franklin S Cooper Jr. wrote:
> On 03/01/2016 03:17 PM, Boris Brezillon wrote:
> > On Tue,  1 Mar 2016 16:04:00 -0500
> > Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> wrote:
> >
> >> Offending Commit: 6e94119 "mtd: nand: return consistent error codes in
> >> ecc.correct() implementations"
> >>
> >> The new error code was not being handled properly in double bit error
> >> detection.
> >>
> >> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
> > Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> >
> > Thanks,
> >
> > Boris
> 
> We just encountered this problem and this patch fixed it.
> Tested-by: Franklin S Cooper Jr <fcooper@ti.com>

Thanks! Pushed to linux-mtd.git. I'll see about sending this to Linus
for v4.5 still, since the regression is in v4.5-rc1.

Regards,
Brian

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

end of thread, other threads:[~2016-03-05  1:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 21:04 [PATCH] mtd: nand: tests: fix regression introduced in mtd_nandectest Jorge Ramirez-Ortiz
2016-03-01 21:17 ` Boris Brezillon
2016-03-02 15:50   ` Franklin S Cooper Jr.
2016-03-05  1:02     ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.