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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux