From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cppJd-000098-BW for linux-mtd@lists.infradead.org; Mon, 20 Mar 2017 04:53:10 +0000 Received: by mail-lf0-x241.google.com with SMTP id y193so9134218lfd.1 for ; Sun, 19 Mar 2017 21:52:49 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20170317141121.49a5115d@bbrezillon> References: <1489646857-10112-1-git-send-email-peterpandong@micron.com> <1489646857-10112-3-git-send-email-peterpandong@micron.com> <20170317141121.49a5115d@bbrezillon> From: Peter Pan Date: Mon, 20 Mar 2017 12:52:47 +0800 Message-ID: Subject: Re: [PATCH v3 2/8] mtd: nand: add oob iterator in nand_for_each_page To: Boris Brezillon Cc: Peter Pan , Richard Weinberger , Brian Norris , Arnaud Mouiche , Thomas Petazzoni , linux-mtd@lists.infradead.org, "linshunquan (A)" Content-Type: text/plain; charset=UTF-8 List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Boris, On Fri, Mar 17, 2017 at 9:11 PM, Boris Brezillon wrote: > On Thu, 16 Mar 2017 14:47:31 +0800 > Peter Pan wrote: > >> Iterate nand pages by both page and oob operation. >> >> Signed-off-by: Peter Pan >> --- >> 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