From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ctVXN-00066z-3C for linux-mtd@lists.infradead.org; Thu, 30 Mar 2017 08:34:36 +0000 Date: Thu, 30 Mar 2017 10:34:01 +0200 From: Boris Brezillon To: Peter Pan Cc: Peter Pan , Richard Weinberger , Brian Norris , Arnaud Mouiche , Thomas Petazzoni , Marek Vasut , Cyrille Pitchen , linux-mtd@lists.infradead.org, "linshunquan (A)" Subject: Re: [PATCH v4 1/9] mtd: nand: add oob iterator in nand_for_each_page Message-ID: <20170330103401.5335205d@bbrezillon> In-Reply-To: References: <1490262226-29092-1-git-send-email-peterpandong@micron.com> <1490262226-29092-2-git-send-email-peterpandong@micron.com> <20170329213427.280c26bb@bbrezillon> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 30 Mar 2017 16:01:04 +0800 Peter Pan wrote: > > > > >> */ > >> struct nand_page_iter { > >> - loff_t offs; > >> int page; > >> int pageoffs; > >> + size_t dataleft; > >> + int ooboffs; > >> + int oobsize; > > > > oobsize can be extracted from nand_device, and since a nand_device > > object it passed to all nand_page_iter_xxx() functions you don't need it > > here. > > Er.. I think we can not get oobsize from nand_device, since oobsize is > determined > by mtd_oob_ops.mode, it can be mtd->oobavail or mtd->oobsize. What do > you think Boris? Correct, I forgot about this aspect. Ignore my previous comment and try to find a better name for this field (+ document it). How about oobbytes_per_page?