From: Boris Brezillon <bbrezillon@kernel.org>
To: Liviu Dudau <liviu.dudau@arm.com>
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: Thu, 31 Jan 2019 18:45:03 +0100 [thread overview]
Message-ID: <20190131184449.6d2ff0af@bbrezillon> (raw)
In-Reply-To: <20190131171327.GM25147@e110455-lin.cambridge.arm.com>
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).
Regards,
Boris
[1]http://patchwork.ozlabs.org/project/linux-mtd/list/?series=87760
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2019-01-31 17:45 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 [this message]
2019-02-05 11:25 ` Liviu Dudau
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=20190131184449.6d2ff0af@bbrezillon \
--to=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=liviu.dudau@arm.com \
--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