mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Aring <alex.aring@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 3/6] mtd: nand: bb: use mtd api directly
Date: Mon, 28 Apr 2014 20:48:30 +0200	[thread overview]
Message-ID: <20140428184830.GX5858@pengutronix.de> (raw)
In-Reply-To: <20140428130524.GA19883@omega>

On Mon, Apr 28, 2014 at 03:05:26PM +0200, Alexander Aring wrote:
> Hi Sascha,
> 
> On Mon, Apr 28, 2014 at 11:49:36AM +0200, Sascha Hauer wrote:
> > The devfs layer just adds an addition indirection between mtd
> > and the bb devices with no purpose. Drop it.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  drivers/mtd/nand/nand-bb.c | 122 +++++++++++++++++++--------------------------
> >  1 file changed, 50 insertions(+), 72 deletions(-)
> > 
> > diff --git a/drivers/mtd/nand/nand-bb.c b/drivers/mtd/nand/nand-bb.c
> > index f387ef6..06b5824 100644
> > --- a/drivers/mtd/nand/nand-bb.c
> > +++ b/drivers/mtd/nand/nand-bb.c
> > @@ -25,22 +25,18 @@
> >  #include <init.h>
> >  #include <ioctl.h>
> >  #include <nand.h>
> > -#include <linux/mtd/mtd-abi.h>
> > +#include <linux/mtd/mtd.h>
> >  #include <fcntl.h>
> >  #include <libgen.h>
> ...
> 
> > @@ -313,8 +291,8 @@ int dev_remove_bb_dev(const char *name)
> >  	list_for_each_entry(bb, &bb_list, list) {
> >  		if (!strcmp(bb->cdev.name, name)) {
> >  			devfs_remove(&bb->cdev);
> > -			cdev_close(bb->cdev_parent);
> >  			list_del_init(&bb->list);
> > +			free(bb->name);
> >  			free(bb);
> >  			return 0;
> >  		}
> 
> I know you doesn't change this line but I think we need a
> list_for_each_entry_safe here instead of list_for_each_entry.

Ouch, you are right. I'll prepare a patch for this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-04-28 18:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28  9:49 [PATCH 1/6] environment: drop envfs_register_partition Sascha Hauer
2014-04-28  9:49 ` [PATCH 2/6] env: erase/protect in envfs_save Sascha Hauer
2014-04-28  9:49 ` [PATCH 3/6] mtd: nand: bb: use mtd api directly Sascha Hauer
2014-04-28 13:05   ` Alexander Aring
2014-04-28 18:48     ` Sascha Hauer [this message]
2014-04-28  9:49 ` [PATCH 4/6] mtd: refactor bb device creation Sascha Hauer
2014-04-28  9:49 ` [PATCH 5/6] mtd: nand: create bb devices automatically Sascha Hauer
2014-04-28  9:49 ` [PATCH 6/6] OF: barebox-env: Use bb device on NAND Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140428184830.GX5858@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=alex.aring@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox