aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2012-11-12 04:52:47 -0500
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-11-21 10:15:05 -0500
commitfafc3d6880b28fe55af935fd43b23a29d61c537d (patch)
tree4ba5038d9cc4453ec8177a4e66d6e704e187326d /drivers/mtd
parent9ff407385441744ea4618f109535014c4b651f8a (diff)
mtd: bcm63xxpart: remove unused variable
namelen is never used, so drop it. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Reviewed-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/bcm63xxpart.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/mtd/bcm63xxpart.c b/drivers/mtd/bcm63xxpart.c
index 63d2a64331f7..1eb1416404a6 100644
--- a/drivers/mtd/bcm63xxpart.c
+++ b/drivers/mtd/bcm63xxpart.c
@@ -79,7 +79,6 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
79 unsigned int rootfsaddr, kerneladdr, spareaddr; 79 unsigned int rootfsaddr, kerneladdr, spareaddr;
80 unsigned int rootfslen, kernellen, sparelen, totallen; 80 unsigned int rootfslen, kernellen, sparelen, totallen;
81 unsigned int cfelen, nvramlen; 81 unsigned int cfelen, nvramlen;
82 int namelen = 0;
83 int i; 82 int i;
84 u32 computed_crc; 83 u32 computed_crc;
85 bool rootfs_first = false; 84 bool rootfs_first = false;
@@ -143,15 +142,11 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
143 } 142 }
144 143
145 /* Determine number of partitions */ 144 /* Determine number of partitions */
146 namelen = 8; 145 if (rootfslen > 0)
147 if (rootfslen > 0) {
148 nrparts++; 146 nrparts++;
149 namelen += 6; 147
150 } 148 if (kernellen > 0)
151 if (kernellen > 0) {
152 nrparts++; 149 nrparts++;
153 namelen += 6;
154 }
155 150
156 /* Ask kernel for more memory */ 151 /* Ask kernel for more memory */
157 parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL); 152 parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL);