[PATCH 01/18] mtd: abstract last MTD partition parser argument
Artem Bityutskiy
dedekind1 at gmail.com
Wed Jun 22 00:21:32 EDT 2011
I see a lot of checkpatch.pl warnings, could you please take a look?
Also, my gcc produces warnings with this patch because you have not
fixed up MPT parsers, e.g., like this:
diff --git a/drivers/mtd/ar7part.c b/drivers/mtd/ar7part.c
index 6697a1e..71bfa2e 100644
--- a/drivers/mtd/ar7part.c
+++ b/drivers/mtd/ar7part.c
@@ -46,7 +46,7 @@ struct ar7_bin_rec {
static int create_mtd_partitions(struct mtd_info *master,
struct mtd_partition **pparts,
- unsigned long origin)
+ struct mtd_part_parser_data *data)
{
struct ar7_bin_rec header;
unsigned int offset;
On Sun, 2011-06-12 at 03:11 +0400, Dmitry Eremin-Solenikov wrote:
> - * @origin: start address of MTD device, %0 unless you are sure you need this.
> + * @parser_data: data passed to mtd parsers
Nitpick, but could you call this MTD partition parser-specific data
instead.
> * @pparts: array of partitions found is returned here
> - * @origin: MTD device start address (use %0 if unsure)
> + * @data: data passed to MTD partition parsers
And this.
> +/**
> + * struct mtd_part_parser_data - used to pass data to MTD partition parsers.
> + * @origin: for RedBoot, start address of MTD device, %0 unless you are sure you need this.
> + */
> +struct mtd_part_parser_data {
> + unsigned long origin;
> +};
Could you please embrace the origin field into an anonymous union - once
we add the of_node field they do not have to be at separate addresses. I
mean:
struct mtd_part_parser_data {
union {
unsigned long origin;
struct device_node *of_node;
};
};
--
Best Regards,
Artem Bityutskiy
More information about the linux-mtd
mailing list