[kernel/2.6.32] MIPS: mark unused variables
[openwrt.git] / target / linux / brcm63xx / patches-3.3 / 041-bcm963xx_real_rootfs_length.patch
1 --- a/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h
2 +++ b/arch/mips/include/asm/mach-bcm63xx/bcm963xx_tag.h
3 @@ -85,8 +85,10 @@ struct bcm_tag {
4 __u32 rootfs_crc;
5 /* 224-227: CRC32 of kernel partition */
6 __u32 kernel_crc;
7 - /* 228-235: Unused at present */
8 - char reserved1[8];
9 + /* 228-231: Image sequence number */
10 + char image_sequence[4];
11 + /* 222-235: Openwrt: real rootfs length */
12 + __u32 real_rootfs_length;
13 /* 236-239: CRC32 of header excluding last 20 bytes */
14 __u32 header_crc;
15 /* 240-255: Unused at present */
16 --- a/drivers/mtd/bcm63xxpart.c
17 +++ b/drivers/mtd/bcm63xxpart.c
18 @@ -77,7 +77,7 @@ static int bcm63xx_parse_cfe_partitions(
19 int ret;
20 size_t retlen;
21 unsigned int rootfsaddr, kerneladdr, spareaddr;
22 - unsigned int rootfslen, kernellen, sparelen, totallen;
23 + unsigned int rootfslen, kernellen, sparelen;
24 unsigned int cfelen, nvramlen;
25 int namelen = 0;
26 int i;
27 @@ -111,14 +111,15 @@ static int bcm63xx_parse_cfe_partitions(
28
29 sscanf(buf->kernel_address, "%u", &kerneladdr);
30 sscanf(buf->kernel_length, "%u", &kernellen);
31 - sscanf(buf->total_length, "%u", &totallen);
32 + rootfslen = buf->real_rootfs_length;
33
34 pr_info("CFE boot tag found with version %s and board type %s\n",
35 tagversion, boardid);
36
37 kerneladdr = kerneladdr - BCM63XX_EXTENDED_SIZE;
38 rootfsaddr = kerneladdr + kernellen;
39 - spareaddr = roundup(totallen, master->erasesize) + cfelen;
40 + rootfslen = roundup(rootfslen, master->erasesize);
41 + spareaddr = rootfsaddr + rootfslen;
42 sparelen = master->size - spareaddr - nvramlen;
43 rootfslen = spareaddr - rootfsaddr;
44 } else {
This page took 0.050503 seconds and 5 git commands to generate.