public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Liviu Dudau <liviu.dudau@arm.com>
To: Boris Brezillon <bbrezillon@kernel.org>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Richard Weinberger <richard@nod.at>,
	Linus Walleij <linus.walleij@linaro.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	Ryan Harkin <ryan.harkin@linaro.org>,
	linux-mtd@lists.infradead.org,
	Cyrille Pitchen <cyrille.pitchen@atmel.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 1/6] mtd: afs: simplify partition parsing
Date: Tue, 5 Feb 2019 11:25:16 +0000	[thread overview]
Message-ID: <20190205112516.GP25147@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <20190131184449.6d2ff0af@bbrezillon>

On Thu, Jan 31, 2019 at 06:45:03PM +0100, Boris Brezillon wrote:
> Hi Liviu,
> 
> On Thu, 31 Jan 2019 17:13:27 +0000
> Liviu Dudau <liviu.dudau@arm.com> wrote:
> 
> > Hi Linus,
> > 
> > On Mon, Jan 28, 2019 at 02:54:44PM +0100, Linus Walleij wrote:
> > > This simplifies the AFS partition parsing to make the code
> > > more straight-forward and readable.
> > > 
> > > Before this patch the code tried to calculate the memory required
> > > to hold the partition info by adding up the sizes of the strings
> > > of the names and adding that to a single memory allocation,
> > > indexing the name pointers in front of the struct mtd_partition
> > > allocations so all allocated data was in one chunk.
> > > 
> > > This is overzealous. Instead use kstrdup and bail out,
> > > kfree():ing the memory used for MTD partitions and names alike
> > > on the errorpath.
> > > 
> > > In the process rename the index variable from idx to i.
> > > 
> > > Cc: Ryan Harkin <ryan.harkin@linaro.org>
> > > Cc: Liviu Dudau <liviu.dudau@arm.com>
> > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > > ---
> > >  drivers/mtd/parsers/afs.c | 67 +++++++++++++++++++--------------------  
> > 
> > What kernel is this series based on? Current Torvalds' tree has the
> > afs.c file in drivers/mtd and not in drivers/mtd/parsers/. Is there a
> > patch that I'm missing moving things around?
> 
> It depends on this series [1] (mentioned in the cover letter).

Funny that, but the cover letter was missing from the series I've
received :)

Thanks for the info!

Best regards,
Liviu

> 
> Regards,
> 
> Boris
> 
> [1]http://patchwork.ozlabs.org/project/linux-mtd/list/?series=87760

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2019-02-05 11:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 13:54 [PATCH 0/6] mtd: afs: Support AFSv2 parsing Linus Walleij
2019-01-28 13:54 ` [PATCH 1/6] mtd: afs: simplify partition parsing Linus Walleij
2019-01-31 17:13   ` Liviu Dudau
2019-01-31 17:45     ` Boris Brezillon
2019-02-05 11:25       ` Liviu Dudau [this message]
2019-02-12 14:31   ` Liviu Dudau
2019-01-28 13:54 ` [PATCH 2/6] mtd: afs: simplify partition detection Linus Walleij
2019-01-28 13:54 ` [PATCH 3/6] mtd: factor out v1 partition parsing Linus Walleij
2019-01-28 13:54 ` [PATCH 4/6] mtd: afs: factor footer parsing into the v1 part parsing Linus Walleij
2019-01-28 13:54 ` [PATCH 5/6] mtd: afs: factor the IIS read into partition parser Linus Walleij
2019-01-28 13:54 ` [PATCH 6/6] mtd: afs: add v2 partition parsing Linus Walleij
2019-04-28 11:38 ` [PATCH 0/6] mtd: afs: Support AFSv2 parsing Linus Walleij

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=20190205112516.GP25147@e110455-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=bbrezillon@kernel.org \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=dwmw2@infradead.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=ryan.harkin@linaro.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