linux-mips
[Top] [All Lists]

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

To: Matteo Croce <technoboy85@gmail.com>
Subject: Re: [PATCH][MIPS][2/7] AR7: mtd
From: David Woodhouse <dwmw2@infradead.org>
Date: Thu, 06 Sep 2007 16:41:22 +0100
Cc: linux-mips@linux-mips.org, Felix Fietkau <nbd@openwrt.org>, Eugene Konev <ejka@imfi.kspu.ru>, linux-mtd@lists.infradead.org
In-reply-to: <200709061723.21091.technoboy85@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200708201704.11529.technoboy85@gmail.com> <200709061723.21091.technoboy85@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
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


<Prev in Thread] Current Thread [Next in Thread>