aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/scan.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-07-22 08:25:02 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-10-14 06:10:20 -0400
commit8bc22961966b845aa5f965be30771902146c2fcc (patch)
treebfa7236da8184560f85fdeb2ad4d565995e237ac /drivers/mtd/ubi/scan.c
parentdcec4c3bdc4d5f4bd2d858ee1ce11e3424cbaed7 (diff)
UBI: fix sparse warnings
Fix "symbol shadows an earlier one" warnings. Although they are harmless but it does not hurt to fix them and make sparse happy. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r--drivers/mtd/ubi/scan.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 80c73d88c83f..18c347b24e27 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -266,7 +266,7 @@ static int compare_lebs(const struct ubi_device *ubi,
266 void *buf; 266 void *buf;
267 int len, err, second_is_newer, bitflips = 0, corrupted = 0; 267 int len, err, second_is_newer, bitflips = 0, corrupted = 0;
268 uint32_t data_crc, crc; 268 uint32_t data_crc, crc;
269 struct ubi_vid_hdr *vidh = NULL; 269 struct ubi_vid_hdr *vh = NULL;
270 unsigned long long sqnum2 = be64_to_cpu(vid_hdr->sqnum); 270 unsigned long long sqnum2 = be64_to_cpu(vid_hdr->sqnum);
271 271
272 if (seb->sqnum == 0 && sqnum2 == 0) { 272 if (seb->sqnum == 0 && sqnum2 == 0) {
@@ -323,11 +323,11 @@ static int compare_lebs(const struct ubi_device *ubi,
323 } else { 323 } else {
324 pnum = seb->pnum; 324 pnum = seb->pnum;
325 325
326 vidh = ubi_zalloc_vid_hdr(ubi); 326 vh = ubi_zalloc_vid_hdr(ubi);
327 if (!vidh) 327 if (!vh)
328 return -ENOMEM; 328 return -ENOMEM;
329 329
330 err = ubi_io_read_vid_hdr(ubi, pnum, vidh, 0); 330 err = ubi_io_read_vid_hdr(ubi, pnum, vh, 0);
331 if (err) { 331 if (err) {
332 if (err == UBI_IO_BITFLIPS) 332 if (err == UBI_IO_BITFLIPS)
333 bitflips = 1; 333 bitflips = 1;
@@ -341,7 +341,7 @@ static int compare_lebs(const struct ubi_device *ubi,
341 } 341 }
342 } 342 }
343 343
344 if (!vidh->copy_flag) { 344 if (!vh->copy_flag) {
345 /* It is not a copy, so it is newer */ 345 /* It is not a copy, so it is newer */
346 dbg_bld("first PEB %d is newer, copy_flag is unset", 346 dbg_bld("first PEB %d is newer, copy_flag is unset",
347 pnum); 347 pnum);
@@ -349,7 +349,7 @@ static int compare_lebs(const struct ubi_device *ubi,
349 goto out_free_vidh; 349 goto out_free_vidh;
350 } 350 }
351 351
352 vid_hdr = vidh; 352 vid_hdr = vh;
353 } 353 }
354 354
355 /* Read the data of the copy and check the CRC */ 355 /* Read the data of the copy and check the CRC */
@@ -379,7 +379,7 @@ static int compare_lebs(const struct ubi_device *ubi,
379 } 379 }
380 380
381 vfree(buf); 381 vfree(buf);
382 ubi_free_vid_hdr(ubi, vidh); 382 ubi_free_vid_hdr(ubi, vh);
383 383
384 if (second_is_newer) 384 if (second_is_newer)
385 dbg_bld("second PEB %d is newer, copy_flag is set", pnum); 385 dbg_bld("second PEB %d is newer, copy_flag is set", pnum);
@@ -391,7 +391,7 @@ static int compare_lebs(const struct ubi_device *ubi,
391out_free_buf: 391out_free_buf:
392 vfree(buf); 392 vfree(buf);
393out_free_vidh: 393out_free_vidh:
394 ubi_free_vid_hdr(ubi, vidh); 394 ubi_free_vid_hdr(ubi, vh);
395 ubi_assert(err < 0); 395 ubi_assert(err < 0);
396 return err; 396 return err;
397} 397}