[PATCH v3 2/8] mtd: nand: add oob iterator in nand_for_each_page

Peter Pan peterpansjtu at gmail.com
Sun Mar 19 21:52:47 PDT 2017


Hi Boris,

On Fri, Mar 17, 2017 at 9:11 PM, Boris Brezillon
<boris.brezillon at free-electrons.com> wrote:
> On Thu, 16 Mar 2017 14:47:31 +0800
> Peter Pan <peterpandong at micron.com> wrote:
>
>> Iterate nand pages by both page and oob operation.
>>
>> Signed-off-by: Peter Pan <peterpandong at micron.com>
>> ---
>>  include/linux/mtd/nand.h | 28 +++++++++++++++++++++++++---
>>  1 file changed, 25 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
>> index 4a812e6..822547e 100644
>> --- a/include/linux/mtd/nand.h
>> +++ b/include/linux/mtd/nand.h
>> @@ -87,6 +87,9 @@ struct nand_page_iter {
>>       loff_t offs;
>>       int page;
>>       int pageoffs;
>> +     int ooboffs;
>> +     int oobsize;
>> +     size_t oobleft;
>
> Maybe we should also add dataleft so that you don't have to pass start
> and len when you call nand_page_iter_end().

Yes, it's better. Fix this in v4

Thanks,
Peter Pan



More information about the linux-mtd mailing list