* [PATCH] fixup! mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset
@ 2017-04-07 7:06 Masahiro Yamada
2017-04-09 7:09 ` Boris Brezillon
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2017-04-07 7:06 UTC (permalink / raw)
To: linux-mtd; +Cc: Boris Brezillon, Leonard Crestez, Masahiro Yamada
---
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) {
kfree(chip->buffers->databuf);
kfree(chip->buffers->ecccode);
kfree(chip->buffers->ecccalc);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fixup! mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset
2017-04-07 7:06 [PATCH] fixup! mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset Masahiro Yamada
@ 2017-04-09 7:09 ` Boris Brezillon
2017-04-10 0:21 ` yamada.masahiro
0 siblings, 1 reply; 3+ messages in thread
From: Boris Brezillon @ 2017-04-09 7:09 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-mtd, Leonard Crestez
On Fri, 7 Apr 2017 16:06:38 +0900
Masahiro Yamada <yamada.masahiro@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?
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").
> kfree(chip->buffers->databuf);
> kfree(chip->buffers->ecccode);
> kfree(chip->buffers->ecccalc);
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] fixup! mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset
2017-04-09 7:09 ` Boris Brezillon
@ 2017-04-10 0:21 ` yamada.masahiro
0 siblings, 0 replies; 3+ messages in thread
From: yamada.masahiro @ 2017-04-10 0:21 UTC (permalink / raw)
To: boris.brezillon; +Cc: linux-mtd, leonard.crestez
Hi Boris,
> -----Original Message-----
> From: Boris Brezillon [mailto:boris.brezillon@free-electrons.com]
> Sent: Sunday, April 09, 2017 4:10 PM
> To: Yamada, Masahiro/山田 真弘 <yamada.masahiro@socionext.com>
> Cc: linux-mtd@lists.infradead.org; Leonard Crestez
> <leonard.crestez@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@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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-10 0:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-07 7:06 [PATCH] fixup! mtd: nand: allocate aligned buffers if NAND_OWN_BUFFERS is unset Masahiro Yamada
2017-04-09 7:09 ` Boris Brezillon
2017-04-10 0:21 ` yamada.masahiro
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.