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: unify mtd partition/device registration
Date: Fri, 14 Nov 2008 13:39:53 -0800 [thread overview]
Message-ID: <20081114133953.bb65b2ad.akpm@linux-foundation.org> (raw)
In-Reply-To: <1226533133-7405-1-git-send-email-vapier@gentoo.org>
On Wed, 12 Nov 2008 18:38:53 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> +int parse_mtd(struct mtd_info *mtd, const char **probe_types,
> + struct mtd_partition *parts, int nr_parts)
> +{
> +#ifdef CONFIG_MTD_PARTITIONS
> + const char *default_part_probe_types[] = {
> + "cmdlinepart",
> + "RedBoot",
> + NULL
> + };
> + int ret;
> +
> + if (!probe_types)
> + probe_types = default_part_probe_types;
> +
> + ret = parse_mtd_partitions(mtd, probe_types, &parts, 0);
> + if (ret > 0) {
> + ret = add_mtd_partitions(mtd, parts, ret);
> + kfree(parts);
> + return ret;
> + } else if (nr_parts)
> + return add_mtd_partitions(mtd, parts, nr_parts);
> +#endif
> +
> + return add_mtd_device(mtd);
> +}
look:
From: Andrew Morton <akpm@linux-foundation.org>
text data bss dec hex filename
before: 2488 88 132 2708 a94 drivers/mtd/mtdcore.o
after: 2456 100 132 2688 a80 drivers/mtd/mtdcore.o
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mtd/mtdcore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/mtd/mtdcore.c~mtd-unify-mtd-partition-device-registration-fix drivers/mtd/mtdcore.c
--- a/drivers/mtd/mtdcore.c~mtd-unify-mtd-partition-device-registration-fix
+++ a/drivers/mtd/mtdcore.c
@@ -306,7 +306,7 @@ int parse_mtd(struct mtd_info *mtd, cons
struct mtd_partition *parts, int nr_parts)
{
#ifdef CONFIG_MTD_PARTITIONS
- const char *default_part_probe_types[] = {
+ static const char *default_part_probe_types[] = {
"cmdlinepart",
"RedBoot",
NULL
_
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: linux-mtd@lists.infradead.org, dwmw2@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: unify mtd partition/device registration
Date: Fri, 14 Nov 2008 13:39:53 -0800 [thread overview]
Message-ID: <20081114133953.bb65b2ad.akpm@linux-foundation.org> (raw)
In-Reply-To: <1226533133-7405-1-git-send-email-vapier@gentoo.org>
On Wed, 12 Nov 2008 18:38:53 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> +int parse_mtd(struct mtd_info *mtd, const char **probe_types,
> + struct mtd_partition *parts, int nr_parts)
> +{
> +#ifdef CONFIG_MTD_PARTITIONS
> + const char *default_part_probe_types[] = {
> + "cmdlinepart",
> + "RedBoot",
> + NULL
> + };
> + int ret;
> +
> + if (!probe_types)
> + probe_types = default_part_probe_types;
> +
> + ret = parse_mtd_partitions(mtd, probe_types, &parts, 0);
> + if (ret > 0) {
> + ret = add_mtd_partitions(mtd, parts, ret);
> + kfree(parts);
> + return ret;
> + } else if (nr_parts)
> + return add_mtd_partitions(mtd, parts, nr_parts);
> +#endif
> +
> + return add_mtd_device(mtd);
> +}
look:
From: Andrew Morton <akpm@linux-foundation.org>
text data bss dec hex filename
before: 2488 88 132 2708 a94 drivers/mtd/mtdcore.o
after: 2456 100 132 2688 a80 drivers/mtd/mtdcore.o
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/mtd/mtdcore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/mtd/mtdcore.c~mtd-unify-mtd-partition-device-registration-fix drivers/mtd/mtdcore.c
--- a/drivers/mtd/mtdcore.c~mtd-unify-mtd-partition-device-registration-fix
+++ a/drivers/mtd/mtdcore.c
@@ -306,7 +306,7 @@ int parse_mtd(struct mtd_info *mtd, cons
struct mtd_partition *parts, int nr_parts)
{
#ifdef CONFIG_MTD_PARTITIONS
- const char *default_part_probe_types[] = {
+ static const char *default_part_probe_types[] = {
"cmdlinepart",
"RedBoot",
NULL
_
next prev parent reply other threads:[~2008-11-14 21:39 UTC|newest]
Thread overview: 31+ 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 13:51 ` Atsushi Nemoto
2008-11-13 14:44 ` Mike Frysinger
2008-11-13 14:44 ` Mike Frysinger
2008-11-14 21:41 ` Andrew Morton
2008-11-14 21:41 ` Andrew Morton
2008-11-14 22:07 ` Mike Frysinger
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 13:43 ` Atsushi Nemoto
2008-11-13 14:28 ` Atsushi Nemoto
2008-11-13 14:28 ` Atsushi Nemoto
2008-11-13 14:51 ` Mike Frysinger
2008-11-13 14:51 ` Mike Frysinger
2008-11-13 15:51 ` Atsushi Nemoto
2008-11-13 15:51 ` Atsushi Nemoto
2008-11-13 15:55 ` Mike Frysinger
2008-11-13 15:55 ` Mike Frysinger
2008-11-13 14:47 ` Mike Frysinger
2008-11-13 14:47 ` Mike Frysinger
2008-11-14 21:39 ` Andrew Morton [this message]
2008-11-14 21:39 ` Andrew Morton
2008-11-16 17:34 ` Jörn Engel
2008-11-16 17:34 ` Jörn Engel
2008-11-16 17:55 ` Mike Frysinger
2008-11-16 17:55 ` Mike Frysinger
2008-11-16 18:02 ` Jörn Engel
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=20081114133953.bb65b2ad.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 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.