[PATCH v2 4/9] mtd: gpmi: rewrite the gpmi_ecc_write_oob() to support the jffs2
Brian Norris
computersforpeace at gmail.com
Sat Aug 24 03:17:16 EDT 2013
On Sat, Aug 24, 2013 at 03:18:13PM -0400, Huang Shijie wrote:
> On Fri, Aug 23, 2013 at 11:19:16PM -0700, Brian Norris wrote:
> > On Mon, Aug 19, 2013 at 10:31:13AM +0800, Huang Shijie wrote:
> > > - */
> > > - return -EPERM;
> > > + struct nand_oobfree *of = gpmi_hw_ecclayout.oobfree;
> >
> > Why do you directly access your static layout? I think you should use
> > the proper indirection, through chip->ecc.layout. (There's a similar
>
> yes, it is better to use the chip->ecc.layout.
>
> > issue with set_geometry_by_ecc_info() currently.)
>
> Not a same issue. The set_geometry_by_ecc_info() is called before we
> call the nand_scan_tail(). so it should not changed.
OK.
> >
> > [BTW, I was about to recommend nand_chip.ecclayout, but it looks like
> > that is just a dead field. It's not initialized anywhere, AFAICT, and if
> The jffs2 write may also uses the ecclayout.
It uses mtd_info.ecclayout. I'm pretty sure nand_chip.ecclayout is never
used (except for a debug print).
Brian
More information about the linux-mtd
mailing list