[PATCH v2 4/9] mtd: gpmi: rewrite the gpmi_ecc_write_oob() to support the jffs2

Huang Shijie shijie8 at gmail.com
Sat Aug 24 15:18:13 EDT 2013


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.

> 
> [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. 

thanks
Huang Shijie





More information about the linux-mtd mailing list