All of lore.kernel.org
 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 1/8] mtd: Simplify partitions
Date: Thu, 13 Feb 2014 19:45:33 +0100	[thread overview]
Message-ID: <20140213184533.GC17250@pengutronix.de> (raw)
In-Reply-To: <20140213140153.GA31426@x61s.campuswlan.hs-rm.de>

On Thu, Feb 13, 2014 at 03:01:55PM +0100, Alexander Aring wrote:
> On Thu, Feb 13, 2014 at 02:34:30PM +0100, Sascha Hauer wrote:
> > On Thu, Feb 13, 2014 at 12:08:58PM +0100, Alexander Aring wrote:
> > > Hi Sascha,
> > > 
> > > only some small nitpicks.
> > > 
> > > On Thu, Feb 13, 2014 at 11:25:28AM +0100, Sascha Hauer wrote:
> > > > Embed the partition information in struct mtd_info. This makes the
> > > > mtd partition code simpler.
> > > > 
> > > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > > ---
> > > >  drivers/mtd/partition.c | 75 ++++++++++++++++++++-----------------------------
> > > >  include/linux/mtd/mtd.h |  5 +++-
> > > >  2 files changed, 34 insertions(+), 46 deletions(-)
> > > > 
> > > > diff --git a/drivers/mtd/partition.c b/drivers/mtd/partition.c
> > > > index 85f486d..7431fc1 100644
> > > > --- a/drivers/mtd/partition.c
> > > > +++ b/drivers/mtd/partition.c
> > > > @@ -4,29 +4,19 @@
> > > >  #include <linux/err.h>
> > > >  #include <linux/mtd/mtd.h>
> > > >  
> > > ...
> > > > +	struct mtd_info *part;
> > > >  	int start = 0, end = 0, i;
> > > >  
> > > > -	slave = xzalloc(sizeof(*slave));
> > > > -	slave_mtd = &slave->mtd;
> > > > +	part = xzalloc(sizeof(*part));
> > > >  
> > > > -	memcpy(slave_mtd, mtd, sizeof(*slave));
> > > > +	memcpy(part, mtd, sizeof(*part));
> > > 
> > > Maybe we should fixup this commit with patch:
> > > 
> > > [PATCH 6/8] mtd: partition: only copy selected fields to partition
> > 
> > I don't think so. Both change the same line, but do quite different
> > things.
> > 
> ok.
> > > > -	struct mtd_part *part = PART(mtd);
> > > > +	if (!part->master)
> > > > +		return -EINVAL;
> > > >  
> > > > -	free(mtd->name);
> > > I think this should be free(part->name);
> > 
> > What do you mean? The line you are referring to is removed in this
> > patch.
> > 
> I mean the part->name = strdup(mtd->name) in add partition function.

Now I get it. It's actually there in the end result but slipped into the
wrong patch. Fixed 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-02-13 18:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13 10:25 [PATCH 1/8] mtd: Simplify partitions Sascha Hauer
2014-02-13 10:25 ` [PATCH 2/8] device: init bus list Sascha Hauer
2014-02-13 10:25 ` [PATCH 3/8] device: remove parameters when unregistering a device Sascha Hauer
2014-02-13 10:25 ` [PATCH 4/8] mtd: erase_info may be modified in mtd_erase Sascha Hauer
2014-02-13 10:25 ` [PATCH 5/8] mtd: Only call of_parse_partitions when the mtd has a parent Sascha Hauer
2014-02-13 10:25 ` [PATCH 6/8] mtd: partition: only copy selected fields to partition Sascha Hauer
2014-02-13 10:25 ` [PATCH 7/8] mtd: register mtd partitions as real mtd devices Sascha Hauer
2014-02-13 10:25 ` [PATCH 8/8] ubi: register ubi devices and volumes as devices Sascha Hauer
2014-02-13 11:08 ` [PATCH 1/8] mtd: Simplify partitions Alexander Aring
2014-02-13 13:34   ` Sascha Hauer
2014-02-13 14:01     ` Alexander Aring
2014-02-13 18:45       ` Sascha Hauer [this message]
2014-02-13 19:05         ` Alexander Aring

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=20140213184533.GC17250@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 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.