[PATCH] fixup! mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset

yamada.masahiro at socionext.com yamada.masahiro at socionext.com
Sun Apr 9 17:21:52 PDT 2017


Hi Boris,


> -----Original Message-----
> From: Boris Brezillon [mailto:boris.brezillon at free-electrons.com]
> Sent: Sunday, April 09, 2017 4:10 PM
> To: Yamada, Masahiro/山田 真弘 <yamada.masahiro at socionext.com>
> Cc: linux-mtd at lists.infradead.org; Leonard Crestez
> <leonard.crestez at nxp.com>
> Subject: Re: [PATCH] fixup! mtd: nand: allocate aligned buffers if
> NAND_OWN_BUFFERS is unset
> 
> On Fri,  7 Apr 2017 16:06:38 +0900
> Masahiro Yamada <yamada.masahiro at socionext.com> wrote:
> 
> > ---
> >
> > Bug port: http://patchwork.ozlabs.org/patch/745136/
> > Please squash into commit f6614d1b.
> > (Currently, only once patch on top of that.)
> > If impossible, I can re-send this with detailed log.
> >
> >
> >  drivers/mtd/nand/nand_base.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mtd/nand/nand_base.c
> b/drivers/mtd/nand/nand_base.c
> > index 8a2e5ff..903a678 100644
> > --- a/drivers/mtd/nand/nand_base.c
> > +++ b/drivers/mtd/nand/nand_base.c
> > @@ -4936,7 +4936,7 @@ void nand_cleanup(struct nand_chip *chip)
> >
> >  	/* Free bad block table memory */
> >  	kfree(chip->bbt);
> > -	if (!(chip->options & NAND_OWN_BUFFERS)) {
> > +	if (!(chip->options & NAND_OWN_BUFFERS) && !chip->buffers) {
> 
> You mean
> 
> 	if (!(chip->options & NAND_OWN_BUFFERS) && chip->buffers) {
> 
> right?

Right.



> I'll squash this change in you initial commit, but I have a comment on
> where the real bug lies IMO (see my reply to "mtd: nand: allocate
> aligned buffers if NAND_OWN_BUFFERS is unset").


Yours is correct.  Thanks!


Masahiro



More information about the linux-mtd mailing list