[PATCH upstream] nand: nand_base: Always initialise oob_poi before writing OOB data

THOMSON, Adam (Adam) adam.thomson at alcatel-lucent.com
Wed Jun 22 06:41:10 EDT 2011


Artem Wrote:

>
> Added the -stable CC here and pushed to l2-mtd-2.6.git with
> some modifications.
>

This is probably my fault, but the mail previous to this had the
version which contained the stable line. That patch version (v3)did
not remove the final memset from nand_do_write_oob, as you requested.
Named both patches the same as they were pretty much indentical,
except for the memset. Didn't know the convention for patch naming
where one was going to stable, and the other to the latest so
marked the latest as upstream to differentiate.

> >   * nand_fill_oob - [Internal] Transfer client buffer to oob
> >   * @chip:  nand chip structure
> > + * @mtd:   MTD device structure
> >   * @oob:   oob data buffer
> >   * @len:   oob data write length
> >   * @ops:   oob ops structure
> >   */
> > -static uint8_t *nand_fill_oob(struct nand_chip *chip,
> uint8_t *oob, size_t len,
> > -                                           struct mtd_oob_ops *ops)
> > +static uint8_t *nand_fill_oob(struct nand_chip *chip,
> struct mtd_info *mtd,
> > +                         uint8_t *oob, size_t len, struct
> mtd_oob_ops *ops)
> >  {
>
> Since we can get chip from mtd->prive, it is not necessary to
> pass both chip and mtd to this function, it is enough to only
> pass mtd.

Fair enough. Didn't spot that. :)

>
> I've done this modification, the resulting patch is here:
> http://git.infradead.org/users/dedekind/l2-mtd-2.6.git/commit/
6a146696fdcf383d90753145dfb367e499790940
>
> Would you please take a look and even better - give it a try?
>

Yep, no problem. Will run it up on target an check all still works.

> Thanks!
>
> --
> Best Regards,
> Artem Bityutskiy
>
> 

Thanks

Adam




More information about the linux-mtd mailing list