All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-24 12:15 ` liaoweixiong
  0 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-24 12:15 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, David Woodhouse, Brian Norris,
	Marek Vasut, Vignesh Raghavendra, Boris Brezillon,
	Frieder Schrempf, Peter Pan, Chuanhong Guo, Schrempf Frieder
  Cc: linux-mtd, linux-kernel, stable, liaoweixiong

In case of the last page containing bitflips (ret > 0),
spinand_mtd_read() will return that number of bitflips for the last
page. But to me it looks like it should instead return max_bitflips like
it does when the last page read returns with 0.

Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
---
 drivers/mtd/nand/spi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 556bfdb..6b9388d 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
 		if (ret == -EBADMSG) {
 			ecc_failed = true;
 			mtd->ecc_stats.failed++;
-			ret = 0;
 		} else {
 			mtd->ecc_stats.corrected += ret;
 			max_bitflips = max_t(unsigned int, max_bitflips, ret);
 		}
 
+		ret = 0;
 		ops->retlen += iter.req.datalen;
 		ops->oobretlen += iter.req.ooblen;
 	}
-- 
1.9.1


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

* [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-24 12:15 ` liaoweixiong
  0 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-24 12:15 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, David Woodhouse, Brian Norris,
	Marek Vasut, Vignesh Raghavendra, Boris Brezillon,
	Frieder Schrempf, Peter Pan, Chuanhong Guo, Schrempf Frieder
  Cc: liaoweixiong, linux-mtd, linux-kernel, stable

In case of the last page containing bitflips (ret > 0),
spinand_mtd_read() will return that number of bitflips for the last
page. But to me it looks like it should instead return max_bitflips like
it does when the last page read returns with 0.

Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
---
 drivers/mtd/nand/spi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 556bfdb..6b9388d 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
 		if (ret == -EBADMSG) {
 			ecc_failed = true;
 			mtd->ecc_stats.failed++;
-			ret = 0;
 		} else {
 			mtd->ecc_stats.corrected += ret;
 			max_bitflips = max_t(unsigned int, max_bitflips, ret);
 		}
 
+		ret = 0;
 		ops->retlen += iter.req.datalen;
 		ops->oobretlen += iter.req.ooblen;
 	}
-- 
1.9.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
  2019-06-24 12:15 ` liaoweixiong
@ 2019-06-24 14:47   ` Schrempf Frieder
  -1 siblings, 0 replies; 24+ messages in thread
From: Schrempf Frieder @ 2019-06-24 14:47 UTC (permalink / raw)
  To: liaoweixiong, Miquel Raynal, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Vignesh Raghavendra, Boris Brezillon,
	Frieder Schrempf, Peter Pan, Chuanhong Guo
  Cc: linux-mtd, linux-kernel, stable

On 24.06.19 14:15, liaoweixiong wrote:
> In case of the last page containing bitflips (ret > 0),
> spinand_mtd_read() will return that number of bitflips for the last
> page. But to me it looks like it should instead return max_bitflips like
> it does when the last page read returns with 0.
> 
> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
> Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
> Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>

Why did you change our Reviewed-by tags to Acked-by tags?

> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
> ---
>   drivers/mtd/nand/spi/core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
> index 556bfdb..6b9388d 100644
> --- a/drivers/mtd/nand/spi/core.c
> +++ b/drivers/mtd/nand/spi/core.c
> @@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
>   		if (ret == -EBADMSG) {
>   			ecc_failed = true;
>   			mtd->ecc_stats.failed++;
> -			ret = 0;
>   		} else {
>   			mtd->ecc_stats.corrected += ret;
>   			max_bitflips = max_t(unsigned int, max_bitflips, ret);
>   		}
>   
> +		ret = 0;
>   		ops->retlen += iter.req.datalen;
>   		ops->oobretlen += iter.req.ooblen;
>   	}
> 

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-24 14:47   ` Schrempf Frieder
  0 siblings, 0 replies; 24+ messages in thread
From: Schrempf Frieder @ 2019-06-24 14:47 UTC (permalink / raw)
  To: liaoweixiong, Miquel Raynal, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Vignesh Raghavendra, Boris Brezillon,
	Frieder Schrempf, Peter Pan, Chuanhong Guo
  Cc: linux-mtd, linux-kernel, stable

On 24.06.19 14:15, liaoweixiong wrote:
> In case of the last page containing bitflips (ret > 0),
> spinand_mtd_read() will return that number of bitflips for the last
> page. But to me it looks like it should instead return max_bitflips like
> it does when the last page read returns with 0.
> 
> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
> Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
> Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>

Why did you change our Reviewed-by tags to Acked-by tags?

> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
> ---
>   drivers/mtd/nand/spi/core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
> index 556bfdb..6b9388d 100644
> --- a/drivers/mtd/nand/spi/core.c
> +++ b/drivers/mtd/nand/spi/core.c
> @@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
>   		if (ret == -EBADMSG) {
>   			ecc_failed = true;
>   			mtd->ecc_stats.failed++;
> -			ret = 0;
>   		} else {
>   			mtd->ecc_stats.corrected += ret;
>   			max_bitflips = max_t(unsigned int, max_bitflips, ret);
>   		}
>   
> +		ret = 0;
>   		ops->retlen += iter.req.datalen;
>   		ops->oobretlen += iter.req.ooblen;
>   	}
> 
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
  2019-06-24 14:47   ` Schrempf Frieder
@ 2019-06-25  1:00     ` liaoweixiong
  -1 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-25  1:00 UTC (permalink / raw)
  To: Schrempf Frieder, Miquel Raynal, Richard Weinberger,
	David Woodhouse, Brian Norris, Marek Vasut, Vignesh Raghavendra,
	Boris Brezillon, Frieder Schrempf, Peter Pan, Chuanhong Guo
  Cc: linux-mtd, linux-kernel, stable

Um.. I am sorry. It is the first time for me to resend patch.
I will send this patch again with correct tags.

On 2019/6/24 PM10:47, Schrempf Frieder wrote:
> On 24.06.19 14:15, liaoweixiong wrote:
>> In case of the last page containing bitflips (ret > 0),
>> spinand_mtd_read() will return that number of bitflips for the last
>> page. But to me it looks like it should instead return max_bitflips like
>> it does when the last page read returns with 0.
>>
>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
>> Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
>> Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> 
> Why did you change our Reviewed-by tags to Acked-by tags?
> 
>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
>> ---
>>   drivers/mtd/nand/spi/core.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
>> index 556bfdb..6b9388d 100644
>> --- a/drivers/mtd/nand/spi/core.c
>> +++ b/drivers/mtd/nand/spi/core.c
>> @@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
>>   		if (ret == -EBADMSG) {
>>   			ecc_failed = true;
>>   			mtd->ecc_stats.failed++;
>> -			ret = 0;
>>   		} else {
>>   			mtd->ecc_stats.corrected += ret;
>>   			max_bitflips = max_t(unsigned int, max_bitflips, ret);
>>   		}
>>   
>> +		ret = 0;
>>   		ops->retlen += iter.req.datalen;
>>   		ops->oobretlen += iter.req.ooblen;
>>   	}

-- 
liaoweixiong

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-25  1:00     ` liaoweixiong
  0 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-25  1:00 UTC (permalink / raw)
  To: Schrempf Frieder, Miquel Raynal, Richard Weinberger,
	David Woodhouse, Brian Norris, Marek Vasut, Vignesh Raghavendra,
	Boris Brezillon, Frieder Schrempf, Peter Pan, Chuanhong Guo
  Cc: linux-mtd, linux-kernel, stable

Um.. I am sorry. It is the first time for me to resend patch.
I will send this patch again with correct tags.

On 2019/6/24 PM10:47, Schrempf Frieder wrote:
> On 24.06.19 14:15, liaoweixiong wrote:
>> In case of the last page containing bitflips (ret > 0),
>> spinand_mtd_read() will return that number of bitflips for the last
>> page. But to me it looks like it should instead return max_bitflips like
>> it does when the last page read returns with 0.
>>
>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
>> Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
>> Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> 
> Why did you change our Reviewed-by tags to Acked-by tags?
> 
>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
>> ---
>>   drivers/mtd/nand/spi/core.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
>> index 556bfdb..6b9388d 100644
>> --- a/drivers/mtd/nand/spi/core.c
>> +++ b/drivers/mtd/nand/spi/core.c
>> @@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
>>   		if (ret == -EBADMSG) {
>>   			ecc_failed = true;
>>   			mtd->ecc_stats.failed++;
>> -			ret = 0;
>>   		} else {
>>   			mtd->ecc_stats.corrected += ret;
>>   			max_bitflips = max_t(unsigned int, max_bitflips, ret);
>>   		}
>>   
>> +		ret = 0;
>>   		ops->retlen += iter.req.datalen;
>>   		ops->oobretlen += iter.req.ooblen;
>>   	}

-- 
liaoweixiong

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
  2019-06-27 18:17         ` Miquel Raynal
@ 2019-06-28  3:51           ` liaoweixiong
  -1 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-28  3:51 UTC (permalink / raw)
  To: Miquel Raynal, Schrempf Frieder
  Cc: Greg KH, Vignesh Raghavendra, Boris Brezillon,
	Richard Weinberger, linux-kernel, Chuanhong Guo, Marek Vasut,
	linux-mtd, stable, Brian Norris, David Woodhouse

Hi Miquel,

On 2019/6/28 AM2:17, Miquel Raynal wrote:
> Hi Miquel,
> 
> Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 27 Jun 2019
> 19:06:44 +0200:
> 
>> Hello,
>>
>> Schrempf Frieder <frieder.schrempf@kontron.de> wrote on Tue, 25 Jun
>> 2019 07:04:06 +0000:
>>
>>> Hi liaoweixiong,
>>>
>>> On 25.06.19 05:08, Greg KH wrote:  
>>>> On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:    
>>>>> In case of the last page containing bitflips (ret > 0),
>>>>> spinand_mtd_read() will return that number of bitflips for the last
>>>>> page. But to me it looks like it should instead return max_bitflips like
>>>>> it does when the last page read returns with 0.
>>>>>
>>>>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>  
>>
>> Please write your entire official first/last name(s)
>>

OK.

>>>>> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
>>>>> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>  
>>
>> I am waiting your next version with Acked-by instead of Rewieved-by
>> tags and Greg's comment addressed.
> 
> Sorry for the mistake, R-b tags are fine here, don't touch that.
> The rest needs to be fixed though.
> 

OK.

>>>>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")  
>>
>> Finally, when we ask you to resend a patch, it means sending a new
>> version of the patch. So in the subject, you should not use the
>> [RESEND] keyword (which means you are sending something again exactly
>> as it was before, you just got ignored, for example) but instead you
>> should increment the version number (v3) and also write a nice
>> changelog after the three dashes '---' (will be ignored by Git when
>> applying).
>>
>> I would like to queue this for the next release so if you can do it
>> ASAP, that would be great.
>>

I will do it right now.

>> Thank you,
>> Miquèl
> 
> 
> 
> 
> Thanks,
> Miquèl
> 

-- 
liaoweixiong

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-28  3:51           ` liaoweixiong
  0 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-28  3:51 UTC (permalink / raw)
  To: Miquel Raynal, Schrempf Frieder
  Cc: Vignesh Raghavendra, Boris Brezillon, Richard Weinberger,
	linux-kernel, stable, Marek Vasut, linux-mtd, Greg KH,
	Brian Norris, Chuanhong Guo, David Woodhouse

Hi Miquel,

On 2019/6/28 AM2:17, Miquel Raynal wrote:
> Hi Miquel,
> 
> Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 27 Jun 2019
> 19:06:44 +0200:
> 
>> Hello,
>>
>> Schrempf Frieder <frieder.schrempf@kontron.de> wrote on Tue, 25 Jun
>> 2019 07:04:06 +0000:
>>
>>> Hi liaoweixiong,
>>>
>>> On 25.06.19 05:08, Greg KH wrote:  
>>>> On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:    
>>>>> In case of the last page containing bitflips (ret > 0),
>>>>> spinand_mtd_read() will return that number of bitflips for the last
>>>>> page. But to me it looks like it should instead return max_bitflips like
>>>>> it does when the last page read returns with 0.
>>>>>
>>>>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>  
>>
>> Please write your entire official first/last name(s)
>>

OK.

>>>>> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
>>>>> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>  
>>
>> I am waiting your next version with Acked-by instead of Rewieved-by
>> tags and Greg's comment addressed.
> 
> Sorry for the mistake, R-b tags are fine here, don't touch that.
> The rest needs to be fixed though.
> 

OK.

>>>>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")  
>>
>> Finally, when we ask you to resend a patch, it means sending a new
>> version of the patch. So in the subject, you should not use the
>> [RESEND] keyword (which means you are sending something again exactly
>> as it was before, you just got ignored, for example) but instead you
>> should increment the version number (v3) and also write a nice
>> changelog after the three dashes '---' (will be ignored by Git when
>> applying).
>>
>> I would like to queue this for the next release so if you can do it
>> ASAP, that would be great.
>>

I will do it right now.

>> Thank you,
>> Miquèl
> 
> 
> 
> 
> Thanks,
> Miquèl
> 

-- 
liaoweixiong

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
  2019-06-27 17:06       ` Miquel Raynal
@ 2019-06-27 18:17         ` Miquel Raynal
  -1 siblings, 0 replies; 24+ messages in thread
From: Miquel Raynal @ 2019-06-27 18:17 UTC (permalink / raw)
  To: Schrempf Frieder
  Cc: liaoweixiong, Greg KH, Vignesh Raghavendra, Boris Brezillon,
	Richard Weinberger, linux-kernel, Chuanhong Guo, Marek Vasut,
	linux-mtd, stable, Brian Norris, David Woodhouse

Hi Miquel,

Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 27 Jun 2019
19:06:44 +0200:

> Hello,
> 
> Schrempf Frieder <frieder.schrempf@kontron.de> wrote on Tue, 25 Jun
> 2019 07:04:06 +0000:
> 
> > Hi liaoweixiong,
> > 
> > On 25.06.19 05:08, Greg KH wrote:  
> > > On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:    
> > >> In case of the last page containing bitflips (ret > 0),
> > >> spinand_mtd_read() will return that number of bitflips for the last
> > >> page. But to me it looks like it should instead return max_bitflips like
> > >> it does when the last page read returns with 0.
> > >>
> > >> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>  
> 
> Please write your entire official first/last name(s)
> 
> > >> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> > >> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>  
> 
> I am waiting your next version with Acked-by instead of Rewieved-by
> tags and Greg's comment addressed.

Sorry for the mistake, R-b tags are fine here, don't touch that.
The rest needs to be fixed though.

> > >> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")  
> 
> Finally, when we ask you to resend a patch, it means sending a new
> version of the patch. So in the subject, you should not use the
> [RESEND] keyword (which means you are sending something again exactly
> as it was before, you just got ignored, for example) but instead you
> should increment the version number (v3) and also write a nice
> changelog after the three dashes '---' (will be ignored by Git when
> applying).
> 
> I would like to queue this for the next release so if you can do it
> ASAP, that would be great.
> 
> Thank you,
> Miquèl




Thanks,
Miquèl

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-27 18:17         ` Miquel Raynal
  0 siblings, 0 replies; 24+ messages in thread
From: Miquel Raynal @ 2019-06-27 18:17 UTC (permalink / raw)
  To: Schrempf Frieder
  Cc: Vignesh Raghavendra, Boris Brezillon, Greg KH, linux-kernel,
	stable, liaoweixiong, Marek Vasut, linux-mtd, Richard Weinberger,
	Brian Norris, Chuanhong Guo, David Woodhouse

Hi Miquel,

Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 27 Jun 2019
19:06:44 +0200:

> Hello,
> 
> Schrempf Frieder <frieder.schrempf@kontron.de> wrote on Tue, 25 Jun
> 2019 07:04:06 +0000:
> 
> > Hi liaoweixiong,
> > 
> > On 25.06.19 05:08, Greg KH wrote:  
> > > On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:    
> > >> In case of the last page containing bitflips (ret > 0),
> > >> spinand_mtd_read() will return that number of bitflips for the last
> > >> page. But to me it looks like it should instead return max_bitflips like
> > >> it does when the last page read returns with 0.
> > >>
> > >> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>  
> 
> Please write your entire official first/last name(s)
> 
> > >> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> > >> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>  
> 
> I am waiting your next version with Acked-by instead of Rewieved-by
> tags and Greg's comment addressed.

Sorry for the mistake, R-b tags are fine here, don't touch that.
The rest needs to be fixed though.

> > >> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")  
> 
> Finally, when we ask you to resend a patch, it means sending a new
> version of the patch. So in the subject, you should not use the
> [RESEND] keyword (which means you are sending something again exactly
> as it was before, you just got ignored, for example) but instead you
> should increment the version number (v3) and also write a nice
> changelog after the three dashes '---' (will be ignored by Git when
> applying).
> 
> I would like to queue this for the next release so if you can do it
> ASAP, that would be great.
> 
> Thank you,
> Miquèl




Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
  2019-06-25  7:04     ` Schrempf Frieder
@ 2019-06-27 17:06       ` Miquel Raynal
  -1 siblings, 0 replies; 24+ messages in thread
From: Miquel Raynal @ 2019-06-27 17:06 UTC (permalink / raw)
  To: Schrempf Frieder
  Cc: liaoweixiong, Greg KH, Vignesh Raghavendra, Boris Brezillon,
	Richard Weinberger, linux-kernel, Chuanhong Guo, Marek Vasut,
	linux-mtd, stable, Brian Norris, David Woodhouse

Hello,

Schrempf Frieder <frieder.schrempf@kontron.de> wrote on Tue, 25 Jun
2019 07:04:06 +0000:

> Hi liaoweixiong,
> 
> On 25.06.19 05:08, Greg KH wrote:
> > On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:  
> >> In case of the last page containing bitflips (ret > 0),
> >> spinand_mtd_read() will return that number of bitflips for the last
> >> page. But to me it looks like it should instead return max_bitflips like
> >> it does when the last page read returns with 0.
> >>
> >> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>

Please write your entire official first/last name(s)

> >> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> >> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>

I am waiting your next version with Acked-by instead of Rewieved-by
tags and Greg's comment addressed.
> >> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")

Finally, when we ask you to resend a patch, it means sending a new
version of the patch. So in the subject, you should not use the
[RESEND] keyword (which means you are sending something again exactly
as it was before, you just got ignored, for example) but instead you
should increment the version number (v3) and also write a nice
changelog after the three dashes '---' (will be ignored by Git when
applying).

I would like to queue this for the next release so if you can do it
ASAP, that would be great.

Thank you,
Miquèl

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-27 17:06       ` Miquel Raynal
  0 siblings, 0 replies; 24+ messages in thread
From: Miquel Raynal @ 2019-06-27 17:06 UTC (permalink / raw)
  To: Schrempf Frieder
  Cc: Vignesh Raghavendra, Boris Brezillon, Greg KH, linux-kernel,
	stable, liaoweixiong, Marek Vasut, linux-mtd, Richard Weinberger,
	Brian Norris, Chuanhong Guo, David Woodhouse

Hello,

Schrempf Frieder <frieder.schrempf@kontron.de> wrote on Tue, 25 Jun
2019 07:04:06 +0000:

> Hi liaoweixiong,
> 
> On 25.06.19 05:08, Greg KH wrote:
> > On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:  
> >> In case of the last page containing bitflips (ret > 0),
> >> spinand_mtd_read() will return that number of bitflips for the last
> >> page. But to me it looks like it should instead return max_bitflips like
> >> it does when the last page read returns with 0.
> >>
> >> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>

Please write your entire official first/last name(s)

> >> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> >> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>

I am waiting your next version with Acked-by instead of Rewieved-by
tags and Greg's comment addressed.
> >> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")

Finally, when we ask you to resend a patch, it means sending a new
version of the patch. So in the subject, you should not use the
[RESEND] keyword (which means you are sending something again exactly
as it was before, you just got ignored, for example) but instead you
should increment the version number (v3) and also write a nice
changelog after the three dashes '---' (will be ignored by Git when
applying).

I would like to queue this for the next release so if you can do it
ASAP, that would be great.

Thank you,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
  2019-06-25 11:56       ` liaoweixiong
@ 2019-06-25 12:04         ` Schrempf Frieder
  -1 siblings, 0 replies; 24+ messages in thread
From: Schrempf Frieder @ 2019-06-25 12:04 UTC (permalink / raw)
  To: liaoweixiong
  Cc: Greg KH, Vignesh Raghavendra, Boris Brezillon,
	Richard Weinberger, linux-kernel, Chuanhong Guo, Marek Vasut,
	linux-mtd, Miquel Raynal, stable, Brian Norris, David Woodhouse

On 25.06.19 13:56, liaoweixiong wrote:
> Oh, i am sorry that i had misunderstanded your letter.

No problem ;)

> Thank you for your document and guidance.

You're welcome!

> On 2019/6/25 PM 3:04, Schrempf Frieder wrote:
>> Hi liaoweixiong,
>>
>> On 25.06.19 05:08, Greg KH wrote:
>>> On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:
>>>> In case of the last page containing bitflips (ret > 0),
>>>> spinand_mtd_read() will return that number of bitflips for the last
>>>> page. But to me it looks like it should instead return max_bitflips like
>>>> it does when the last page read returns with 0.
>>>>
>>>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
>>>> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
>>>> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
>>>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
>>>> ---
>>>>    drivers/mtd/nand/spi/core.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> <formletter>
>>>
>>> This is not the correct way to submit patches for inclusion in the
>>> stable kernel tree.  Please read:
>>>       https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
>>> for how to do this properly.
>>>
>>> </formletter>
>>
>> FYI, you should not send the patch to stable@vger.kernel.org, but
>> instead, as I said in my other reply, add the tag "Cc:
>> stable@vger.kernel.org". See "Option 1" in the document Greg referred to.
>>
>> Thanks,
>> Frieder
>>
> 

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-25 12:04         ` Schrempf Frieder
  0 siblings, 0 replies; 24+ messages in thread
From: Schrempf Frieder @ 2019-06-25 12:04 UTC (permalink / raw)
  To: liaoweixiong
  Cc: Vignesh Raghavendra, Boris Brezillon, Richard Weinberger,
	Miquel Raynal, linux-kernel, stable, Marek Vasut, linux-mtd,
	Greg KH, Brian Norris, Chuanhong Guo, David Woodhouse

On 25.06.19 13:56, liaoweixiong wrote:
> Oh, i am sorry that i had misunderstanded your letter.

No problem ;)

> Thank you for your document and guidance.

You're welcome!

> On 2019/6/25 PM 3:04, Schrempf Frieder wrote:
>> Hi liaoweixiong,
>>
>> On 25.06.19 05:08, Greg KH wrote:
>>> On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:
>>>> In case of the last page containing bitflips (ret > 0),
>>>> spinand_mtd_read() will return that number of bitflips for the last
>>>> page. But to me it looks like it should instead return max_bitflips like
>>>> it does when the last page read returns with 0.
>>>>
>>>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
>>>> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
>>>> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
>>>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
>>>> ---
>>>>    drivers/mtd/nand/spi/core.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> <formletter>
>>>
>>> This is not the correct way to submit patches for inclusion in the
>>> stable kernel tree.  Please read:
>>>       https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
>>> for how to do this properly.
>>>
>>> </formletter>
>>
>> FYI, you should not send the patch to stable@vger.kernel.org, but
>> instead, as I said in my other reply, add the tag "Cc:
>> stable@vger.kernel.org". See "Option 1" in the document Greg referred to.
>>
>> Thanks,
>> Frieder
>>
> 
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-25 12:03 ` liaoweixiong
  0 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-25 12:03 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, David Woodhouse, Brian Norris,
	Marek Vasut, Vignesh Raghavendra, Boris Brezillon,
	Frieder Schrempf, Peter Pan, Stefan Roese, Jeff Kletsky
  Cc: linux-mtd, linux-kernel, liaoweixiong, stable

In case of the last page containing bitflips (ret > 0),
spinand_mtd_read() will return that number of bitflips for the last
page. But to me it looks like it should instead return max_bitflips like
it does when the last page read returns with 0.

Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Cc: stable@vger.kernel.org
Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
---
 drivers/mtd/nand/spi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 556bfdb..6b9388d 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
 		if (ret == -EBADMSG) {
 			ecc_failed = true;
 			mtd->ecc_stats.failed++;
-			ret = 0;
 		} else {
 			mtd->ecc_stats.corrected += ret;
 			max_bitflips = max_t(unsigned int, max_bitflips, ret);
 		}
 
+		ret = 0;
 		ops->retlen += iter.req.datalen;
 		ops->oobretlen += iter.req.ooblen;
 	}
-- 
1.9.1


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

* [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-25 12:03 ` liaoweixiong
  0 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-25 12:03 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, David Woodhouse, Brian Norris,
	Marek Vasut, Vignesh Raghavendra, Boris Brezillon,
	Frieder Schrempf, Peter Pan, Stefan Roese, Jeff Kletsky
  Cc: liaoweixiong, linux-mtd, linux-kernel, stable

In case of the last page containing bitflips (ret > 0),
spinand_mtd_read() will return that number of bitflips for the last
page. But to me it looks like it should instead return max_bitflips like
it does when the last page read returns with 0.

Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Cc: stable@vger.kernel.org
Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
---
 drivers/mtd/nand/spi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 556bfdb..6b9388d 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
 		if (ret == -EBADMSG) {
 			ecc_failed = true;
 			mtd->ecc_stats.failed++;
-			ret = 0;
 		} else {
 			mtd->ecc_stats.corrected += ret;
 			max_bitflips = max_t(unsigned int, max_bitflips, ret);
 		}
 
+		ret = 0;
 		ops->retlen += iter.req.datalen;
 		ops->oobretlen += iter.req.ooblen;
 	}
-- 
1.9.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
  2019-06-25  7:04     ` Schrempf Frieder
@ 2019-06-25 11:56       ` liaoweixiong
  -1 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-25 11:56 UTC (permalink / raw)
  To: Schrempf Frieder
  Cc: Greg KH, Vignesh Raghavendra, Boris Brezillon,
	Richard Weinberger, linux-kernel, Chuanhong Guo, Marek Vasut,
	linux-mtd, Miquel Raynal, stable, Brian Norris, David Woodhouse

Oh, i am sorry that i had misunderstanded your letter.
Thank you for your document and guidance.

On 2019/6/25 PM 3:04, Schrempf Frieder wrote:
> Hi liaoweixiong,
> 
> On 25.06.19 05:08, Greg KH wrote:
>> On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:
>>> In case of the last page containing bitflips (ret > 0),
>>> spinand_mtd_read() will return that number of bitflips for the last
>>> page. But to me it looks like it should instead return max_bitflips like
>>> it does when the last page read returns with 0.
>>>
>>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
>>> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
>>> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
>>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
>>> ---
>>>   drivers/mtd/nand/spi/core.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> <formletter>
>>
>> This is not the correct way to submit patches for inclusion in the
>> stable kernel tree.  Please read:
>>      https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
>> for how to do this properly.
>>
>> </formletter>
> 
> FYI, you should not send the patch to stable@vger.kernel.org, but 
> instead, as I said in my other reply, add the tag "Cc: 
> stable@vger.kernel.org". See "Option 1" in the document Greg referred to.
> 
> Thanks,
> Frieder
> 

-- 
liaoweixiong

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-25 11:56       ` liaoweixiong
  0 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-25 11:56 UTC (permalink / raw)
  To: Schrempf Frieder
  Cc: Vignesh Raghavendra, Boris Brezillon, Richard Weinberger,
	Miquel Raynal, linux-kernel, stable, Marek Vasut, linux-mtd,
	Greg KH, Brian Norris, Chuanhong Guo, David Woodhouse

Oh, i am sorry that i had misunderstanded your letter.
Thank you for your document and guidance.

On 2019/6/25 PM 3:04, Schrempf Frieder wrote:
> Hi liaoweixiong,
> 
> On 25.06.19 05:08, Greg KH wrote:
>> On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:
>>> In case of the last page containing bitflips (ret > 0),
>>> spinand_mtd_read() will return that number of bitflips for the last
>>> page. But to me it looks like it should instead return max_bitflips like
>>> it does when the last page read returns with 0.
>>>
>>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
>>> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
>>> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
>>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
>>> ---
>>>   drivers/mtd/nand/spi/core.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> <formletter>
>>
>> This is not the correct way to submit patches for inclusion in the
>> stable kernel tree.  Please read:
>>      https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
>> for how to do this properly.
>>
>> </formletter>
> 
> FYI, you should not send the patch to stable@vger.kernel.org, but 
> instead, as I said in my other reply, add the tag "Cc: 
> stable@vger.kernel.org". See "Option 1" in the document Greg referred to.
> 
> Thanks,
> Frieder
> 

-- 
liaoweixiong

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
  2019-06-25  3:08   ` Greg KH
@ 2019-06-25  7:04     ` Schrempf Frieder
  -1 siblings, 0 replies; 24+ messages in thread
From: Schrempf Frieder @ 2019-06-25  7:04 UTC (permalink / raw)
  To: liaoweixiong
  Cc: Greg KH, Vignesh Raghavendra, Boris Brezillon,
	Richard Weinberger, linux-kernel, Chuanhong Guo, Marek Vasut,
	linux-mtd, Miquel Raynal, stable, Brian Norris, David Woodhouse

Hi liaoweixiong,

On 25.06.19 05:08, Greg KH wrote:
> On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:
>> In case of the last page containing bitflips (ret > 0),
>> spinand_mtd_read() will return that number of bitflips for the last
>> page. But to me it looks like it should instead return max_bitflips like
>> it does when the last page read returns with 0.
>>
>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
>> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
>> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
>> ---
>>   drivers/mtd/nand/spi/core.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> <formletter>
> 
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree.  Please read:
>      https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for how to do this properly.
> 
> </formletter>

FYI, you should not send the patch to stable@vger.kernel.org, but 
instead, as I said in my other reply, add the tag "Cc: 
stable@vger.kernel.org". See "Option 1" in the document Greg referred to.

Thanks,
Frieder

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-25  7:04     ` Schrempf Frieder
  0 siblings, 0 replies; 24+ messages in thread
From: Schrempf Frieder @ 2019-06-25  7:04 UTC (permalink / raw)
  To: liaoweixiong
  Cc: Vignesh Raghavendra, Boris Brezillon, Richard Weinberger,
	Miquel Raynal, linux-kernel, stable, Marek Vasut, linux-mtd,
	Greg KH, Brian Norris, Chuanhong Guo, David Woodhouse

Hi liaoweixiong,

On 25.06.19 05:08, Greg KH wrote:
> On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:
>> In case of the last page containing bitflips (ret > 0),
>> spinand_mtd_read() will return that number of bitflips for the last
>> page. But to me it looks like it should instead return max_bitflips like
>> it does when the last page read returns with 0.
>>
>> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
>> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
>> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
>> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
>> ---
>>   drivers/mtd/nand/spi/core.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> <formletter>
> 
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree.  Please read:
>      https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for how to do this properly.
> 
> </formletter>

FYI, you should not send the patch to stable@vger.kernel.org, but 
instead, as I said in my other reply, add the tag "Cc: 
stable@vger.kernel.org". See "Option 1" in the document Greg referred to.

Thanks,
Frieder
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
  2019-06-25  1:02 ` liaoweixiong
@ 2019-06-25  3:08   ` Greg KH
  -1 siblings, 0 replies; 24+ messages in thread
From: Greg KH @ 2019-06-25  3:08 UTC (permalink / raw)
  To: liaoweixiong
  Cc: Miquel Raynal, Richard Weinberger, David Woodhouse, Brian Norris,
	Marek Vasut, Vignesh Raghavendra, Boris Brezillon,
	Frieder Schrempf, Peter Pan, Chuanhong Guo, Schrempf Frieder,
	linux-mtd, linux-kernel, stable

On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:
> In case of the last page containing bitflips (ret > 0),
> spinand_mtd_read() will return that number of bitflips for the last
> page. But to me it looks like it should instead return max_bitflips like
> it does when the last page read returns with 0.
> 
> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
> ---
>  drivers/mtd/nand/spi/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

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

* Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-25  3:08   ` Greg KH
  0 siblings, 0 replies; 24+ messages in thread
From: Greg KH @ 2019-06-25  3:08 UTC (permalink / raw)
  To: liaoweixiong
  Cc: Vignesh Raghavendra, Boris Brezillon, Richard Weinberger,
	linux-kernel, Chuanhong Guo, Marek Vasut, Frieder Schrempf,
	linux-mtd, Schrempf Frieder, Miquel Raynal, stable, Brian Norris,
	David Woodhouse, Peter Pan

On Tue, Jun 25, 2019 at 09:02:29AM +0800, liaoweixiong wrote:
> In case of the last page containing bitflips (ret > 0),
> spinand_mtd_read() will return that number of bitflips for the last
> page. But to me it looks like it should instead return max_bitflips like
> it does when the last page read returns with 0.
> 
> Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
> ---
>  drivers/mtd/nand/spi/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-25  1:02 ` liaoweixiong
  0 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-25  1:02 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, David Woodhouse, Brian Norris,
	Marek Vasut, Vignesh Raghavendra, Boris Brezillon,
	Frieder Schrempf, Peter Pan, Chuanhong Guo, Schrempf Frieder
  Cc: linux-mtd, linux-kernel, stable, liaoweixiong

In case of the last page containing bitflips (ret > 0),
spinand_mtd_read() will return that number of bitflips for the last
page. But to me it looks like it should instead return max_bitflips like
it does when the last page read returns with 0.

Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
---
 drivers/mtd/nand/spi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 556bfdb..6b9388d 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
 		if (ret == -EBADMSG) {
 			ecc_failed = true;
 			mtd->ecc_stats.failed++;
-			ret = 0;
 		} else {
 			mtd->ecc_stats.corrected += ret;
 			max_bitflips = max_t(unsigned int, max_bitflips, ret);
 		}
 
+		ret = 0;
 		ops->retlen += iter.req.datalen;
 		ops->oobretlen += iter.req.ooblen;
 	}
-- 
1.9.1


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

* [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips
@ 2019-06-25  1:02 ` liaoweixiong
  0 siblings, 0 replies; 24+ messages in thread
From: liaoweixiong @ 2019-06-25  1:02 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, David Woodhouse, Brian Norris,
	Marek Vasut, Vignesh Raghavendra, Boris Brezillon,
	Frieder Schrempf, Peter Pan, Chuanhong Guo, Schrempf Frieder
  Cc: liaoweixiong, linux-mtd, linux-kernel, stable

In case of the last page containing bitflips (ret > 0),
spinand_mtd_read() will return that number of bitflips for the last
page. But to me it looks like it should instead return max_bitflips like
it does when the last page read returns with 0.

Signed-off-by: liaoweixiong <liaoweixiong@allwinnertech.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
---
 drivers/mtd/nand/spi/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 556bfdb..6b9388d 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -511,12 +511,12 @@ static int spinand_mtd_read(struct mtd_info *mtd, loff_t from,
 		if (ret == -EBADMSG) {
 			ecc_failed = true;
 			mtd->ecc_stats.failed++;
-			ret = 0;
 		} else {
 			mtd->ecc_stats.corrected += ret;
 			max_bitflips = max_t(unsigned int, max_bitflips, ret);
 		}
 
+		ret = 0;
 		ops->retlen += iter.req.datalen;
 		ops->oobretlen += iter.req.ooblen;
 	}
-- 
1.9.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2019-06-28  3:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 12:15 [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips liaoweixiong
2019-06-24 12:15 ` liaoweixiong
2019-06-24 14:47 ` Schrempf Frieder
2019-06-24 14:47   ` Schrempf Frieder
2019-06-25  1:00   ` liaoweixiong
2019-06-25  1:00     ` liaoweixiong
2019-06-25  1:02 liaoweixiong
2019-06-25  1:02 ` liaoweixiong
2019-06-25  3:08 ` Greg KH
2019-06-25  3:08   ` Greg KH
2019-06-25  7:04   ` Schrempf Frieder
2019-06-25  7:04     ` Schrempf Frieder
2019-06-25 11:56     ` liaoweixiong
2019-06-25 11:56       ` liaoweixiong
2019-06-25 12:04       ` Schrempf Frieder
2019-06-25 12:04         ` Schrempf Frieder
2019-06-27 17:06     ` Miquel Raynal
2019-06-27 17:06       ` Miquel Raynal
2019-06-27 18:17       ` Miquel Raynal
2019-06-27 18:17         ` Miquel Raynal
2019-06-28  3:51         ` liaoweixiong
2019-06-28  3:51           ` liaoweixiong
2019-06-25 12:03 liaoweixiong
2019-06-25 12:03 ` liaoweixiong

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.