lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081114133953.bb65b2ad.akpm@linux-foundation.org>
Date:	Fri, 14 Nov 2008 13:39:53 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Mike Frysinger <vapier@...too.org>
Cc:	linux-mtd@...ts.infradead.org, dwmw2@...radead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: unify mtd partition/device registration

On Wed, 12 Nov 2008 18:38:53 -0500
Mike Frysinger <vapier@...too.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@...ux-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@....ocn.ne.jp>
Cc: David Woodhouse <dwmw2@...radead.org>
Cc: Mike Frysinger <vapier@...too.org>
Signed-off-by: Andrew Morton <akpm@...ux-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
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ