Thread (25 messages) 25 messages, 9 authors, 2007-09-12

Re: [PATCH][MIPS][2/7] AR7: mtd

From: David Woodhouse <dwmw2@infradead.org>
Date: 2007-09-06 15:41:42

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help