Re: [PATCH] mtdchar: fix usage of mtd_ooblayout_ecc()

2018-03-05 Thread Boris Brezillon
Hi OuYang, On Mon, 5 Mar 2018 22:53:46 +0800 OuYang ZhiZhong wrote: > Section was not properly computed. The value of OOB region definition is > always ECC section 0 information in the OOB area, but we want to get all > the ECC bytes information, so we should call >

Re: [PATCH] mtdchar: fix usage of mtd_ooblayout_ecc()

2018-03-05 Thread Boris Brezillon
Hi OuYang, On Mon, 5 Mar 2018 22:53:46 +0800 OuYang ZhiZhong wrote: > Section was not properly computed. The value of OOB region definition is > always ECC section 0 information in the OOB area, but we want to get all > the ECC bytes information, so we should call > mtd_ooblayout_ecc(mtd,

[PATCH] mtdchar: fix usage of mtd_ooblayout_ecc()

2018-03-05 Thread OuYang ZhiZhong
Section was not properly computed. The value of OOB region definition is always ECC section 0 information in the OOB area, but we want to get all the ECC bytes information, so we should call mtd_ooblayout_ecc(mtd, section++, ) until it returns -ERANGE. This is fixed by using i instead of section.

[PATCH] mtdchar: fix usage of mtd_ooblayout_ecc()

2018-03-05 Thread OuYang ZhiZhong
Section was not properly computed. The value of OOB region definition is always ECC section 0 information in the OOB area, but we want to get all the ECC bytes information, so we should call mtd_ooblayout_ecc(mtd, section++, ) until it returns -ERANGE. This is fixed by using i instead of section.