2019-06-25 04:07:48

by WeiXiong Liao

[permalink] [raw]
Subject: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips

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 <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Reviewed-by: Frieder Schrempf <[email protected]>
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


2019-06-25 04:15:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips

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 <[email protected]>
> Reviewed-by: Boris Brezillon <[email protected]>
> Reviewed-by: Frieder Schrempf <[email protected]>
> 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>

2019-06-25 07:49:14

by Frieder Schrempf

[permalink] [raw]
Subject: Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips

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 <[email protected]>
>> Reviewed-by: Boris Brezillon <[email protected]>
>> Reviewed-by: Frieder Schrempf <[email protected]>
>> 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 [email protected], but
instead, as I said in my other reply, add the tag "Cc:
[email protected]". See "Option 1" in the document Greg referred to.

Thanks,
Frieder

2019-06-25 13:14:08

by WeiXiong Liao

[permalink] [raw]
Subject: Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips

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 <[email protected]>
>>> Reviewed-by: Boris Brezillon <[email protected]>
>>> Reviewed-by: Frieder Schrempf <[email protected]>
>>> 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 [email protected], but
> instead, as I said in my other reply, add the tag "Cc:
> [email protected]". See "Option 1" in the document Greg referred to.
>
> Thanks,
> Frieder
>

--
liaoweixiong

2019-06-25 13:21:15

by Frieder Schrempf

[permalink] [raw]
Subject: Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips

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 <[email protected]>
>>>> Reviewed-by: Boris Brezillon <[email protected]>
>>>> Reviewed-by: Frieder Schrempf <[email protected]>
>>>> 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 [email protected], but
>> instead, as I said in my other reply, add the tag "Cc:
>> [email protected]". See "Option 1" in the document Greg referred to.
>>
>> Thanks,
>> Frieder
>>
>

2019-06-27 17:09:09

by Miquel Raynal

[permalink] [raw]
Subject: Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips

Hello,

Schrempf Frieder <[email protected]> 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 <[email protected]>

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

> >> Reviewed-by: Boris Brezillon <[email protected]>
> >> Reviewed-by: Frieder Schrempf <[email protected]>

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

2019-06-27 18:18:23

by Miquel Raynal

[permalink] [raw]
Subject: Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips

Hi Miquel,

Miquel Raynal <[email protected]> wrote on Thu, 27 Jun 2019
19:06:44 +0200:

> Hello,
>
> Schrempf Frieder <[email protected]> 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 <[email protected]>
>
> Please write your entire official first/last name(s)
>
> > >> Reviewed-by: Boris Brezillon <[email protected]>
> > >> Reviewed-by: Frieder Schrempf <[email protected]>
>
> 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

2019-06-28 03:53:01

by WeiXiong Liao

[permalink] [raw]
Subject: Re: [RESEND PATCH v2] mtd: spinand: read return badly if the last page has bitflips

Hi Miquel,

On 2019/6/28 AM2:17, Miquel Raynal wrote:
> Hi Miquel,
>
> Miquel Raynal <[email protected]> wrote on Thu, 27 Jun 2019
> 19:06:44 +0200:
>
>> Hello,
>>
>> Schrempf Frieder <[email protected]> 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 <[email protected]>
>>
>> Please write your entire official first/last name(s)
>>

OK.

>>>>> Reviewed-by: Boris Brezillon <[email protected]>
>>>>> Reviewed-by: Frieder Schrempf <[email protected]>
>>
>> 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