[PATCH][MIPS][2/7] AR7: mtd
David Woodhouse
dwmw2 at infradead.org
Thu Sep 6 11:41:22 EDT 2007
On Thu, 2007-09-06 at 17:23 +0200, Matteo Croce wrote:
> + unsigned int pre_size = master->erasesize, post_size = 0,
> + root_offset = 0xe0000;
Separate lines for those, please.
> + int retries = 10;
> +
> + printk("Parsing AR7 partition map...\n");
Needs priority. (As do one or two other printks).
> + do {
> + offset = pre_size;
> + master->read(master, offset, sizeof(header), &len, (u_char
> *)&header);
> + if (!strncmp((char *)&header, "TIENV0.8", 8))
> + ar7_parts[1].offset = pre_size;
> + if (header.checksum == 0xfeedfa42)
> + break;
> + if (header.checksum == 0xfeed1281)
> + break;
> + pre_size += master->erasesize;
> + } while (retries--);
Needs some comments. What are the magic numbers? What is this retry
thing all about?
Endianness?
> +MODULE_LICENSE("GPL");
> +MODULE_AUTHOR("Felix Fietkau, Eugene Konev");
Normally I prefer to see email addresses in MODULE_AUTHOR(). You missed
them from the comments at the top of the file too.
--
dwmw2
More information about the linux-mtd
mailing list