Re: [PATCH 08/23] mtd: rawnand: Pass a nand_chip object to ecc->read_xxx() hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stefan,

On Sat, 18 Aug 2018 10:30:13 +0200
Stefan Agner <stefan@xxxxxxxx> wrote:

> > diff --git a/drivers/mtd/nand/raw/tegra_nand.c
> > b/drivers/mtd/nand/raw/tegra_nand.c
> > index 5dcee20e2a8c..bcc3a2888c4f 100644
> > --- a/drivers/mtd/nand/raw/tegra_nand.c
> > +++ b/drivers/mtd/nand/raw/tegra_nand.c
> > @@ -615,10 +615,10 @@ static int tegra_nand_page_xfer(struct mtd_info
> > *mtd, struct nand_chip *chip,
> >  	return ret;
> >  }
> >  
> > -static int tegra_nand_read_page_raw(struct mtd_info *mtd,
> > -				    struct nand_chip *chip, u8 *buf,
> > +static int tegra_nand_read_page_raw(struct nand_chip *chip, u8 *buf,
> >  				    int oob_required, int page)
> >  {
> > +	struct mtd_info *mtd = nand_to_mtd(chip);
> >  	void *oob_buf = oob_required ? chip->oob_poi : NULL;
> >  
> >  	return tegra_nand_page_xfer(mtd, chip, buf, oob_buf,  
> 
> Since mtd is only required to pass it to tegra_nand_page_xfer, it would
> be better to change tegra_nand_page_xfer to only take chip.

For sure, but that's the sort of cleanups I'll leave to NAND controller
driver maintainers (in this case you ;-)). I only take care of the NAND
API here and try to make things as simple as possible to ease review and
avoid breaking drivers. 

Regards,

Boris
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux