From: Andrew Morton <akpm@linux-foundation.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: dwmw2@infradead.org, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd/physmap: use parse_mtd()
Date: Fri, 14 Nov 2008 13:41:16 -0800 [thread overview]
Message-ID: <20081114134116.972fce2f.akpm@linux-foundation.org> (raw)
In-Reply-To: <1226533189-8492-1-git-send-email-vapier@gentoo.org>
On Wed, 12 Nov 2008 18:39:48 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> Call parse_mtd() to handle partition/device registration rather than doing
> it all ourself.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> drivers/mtd/maps/physmap.c | 21 +--------------------
> 1 files changed, 1 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
> index 42d844f..9b87fd8 100644
> --- a/drivers/mtd/maps/physmap.c
> +++ b/drivers/mtd/maps/physmap.c
> @@ -84,9 +84,6 @@ static int physmap_flash_remove(struct platform_device *dev)
> }
>
> static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL };
> -#ifdef CONFIG_MTD_PARTITIONS
> -static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
> -#endif
>
> static int physmap_flash_probe(struct platform_device *dev)
> {
> @@ -170,23 +167,7 @@ static int physmap_flash_probe(struct platform_device *dev)
> if (err)
> goto err_out;
>
> -#ifdef CONFIG_MTD_PARTITIONS
> - err = parse_mtd_partitions(info->cmtd, part_probe_types, &info->parts, 0);
> - if (err > 0) {
> - add_mtd_partitions(info->cmtd, info->parts, err);
> - return 0;
> - }
> -
> - if (physmap_data->nr_parts) {
> - printk(KERN_NOTICE "Using physmap partition information\n");
> - add_mtd_partitions(info->cmtd, physmap_data->parts,
> - physmap_data->nr_parts);
> - return 0;
> - }
> -#endif
> -
> - add_mtd_device(info->cmtd);
> - return 0;
> + return parse_mtd(info->cmtd, NULL, physmap_data->parts, physmap_data->nr_parts);
>
> err_out:
> physmap_flash_remove(dev);
This didn't apply due to
physmap-fix-leak-of-memory-returned-by-parse_mtd_partitions.patch. I
just smashed it in anyway. Should I drop
physmap-fix-leak-of-memory-returned-by-parse_mtd_partitions.patch
instead? Your changelog mentioned nothing about leak-fixing?
next prev parent reply other threads:[~2008-11-14 21:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 23:38 [PATCH] mtd: unify mtd partition/device registration Mike Frysinger
2008-11-12 23:39 ` [PATCH] mtd/physmap: use parse_mtd() Mike Frysinger
2008-11-13 13:51 ` Atsushi Nemoto
2008-11-13 14:44 ` Mike Frysinger
2008-11-14 21:41 ` Andrew Morton [this message]
2008-11-14 22:07 ` Mike Frysinger
2008-11-12 23:39 ` [PATCH] mtd/bfin-async-flash: " Mike Frysinger
2008-11-13 13:43 ` [PATCH] mtd: unify mtd partition/device registration Atsushi Nemoto
2008-11-13 14:28 ` Atsushi Nemoto
2008-11-13 14:51 ` Mike Frysinger
2008-11-13 15:51 ` Atsushi Nemoto
2008-11-13 15:55 ` Mike Frysinger
2008-11-13 14:47 ` Mike Frysinger
2008-11-14 21:39 ` Andrew Morton
2008-11-16 17:34 ` Jörn Engel
2008-11-16 17:55 ` Mike Frysinger
2008-11-16 18:02 ` Jörn Engel
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=20081114134116.972fce2f.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier@gentoo.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