]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[XFS] fix sparse shadowed variable warnings
authorChristoph Hellwig <hch@infradead.org>
Thu, 16 Aug 2007 05:38:19 +0000 (15:38 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Wed, 5 Sep 2007 04:50:26 +0000 (14:50 +1000)
- in xfs_probe_cluster rename the inner len to pg_len. There's no harm
  here because the outer len isn't used after the inner len comes into
  existence but it keeps the code clean.
- in xfs_da_do_buf remove the inner i because they don't overlap
  and they are both the same type.

SGI-PV: 968555
SGI-Modid: xfs-linux-melb:xfs-kern:29311a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/xfs_da_btree.c

index fd4105d662e036b11821f15fb7780a91f0929b00..d9c40fe641953a20b9b5fc8059f65b481382f9b7 100644 (file)
@@ -652,7 +652,7 @@ xfs_probe_cluster(
 
                for (i = 0; i < pagevec_count(&pvec); i++) {
                        struct page *page = pvec.pages[i];
-                       size_t pg_offset, len = 0;
+                       size_t pg_offset, pg_len = 0;
 
                        if (tindex == tlast) {
                                pg_offset =
@@ -665,16 +665,16 @@ xfs_probe_cluster(
                                pg_offset = PAGE_CACHE_SIZE;
 
                        if (page->index == tindex && !TestSetPageLocked(page)) {
-                               len = xfs_probe_page(page, pg_offset, mapped);
+                               pg_len = xfs_probe_page(page, pg_offset, mapped);
                                unlock_page(page);
                        }
 
-                       if (!len) {
+                       if (!pg_len) {
                                done = 1;
                                break;
                        }
 
-                       total += len;
+                       total += pg_len;
                        tindex++;
                }
 
index aea37df4aa629361064f36f8e388d0a244248022..26d09e2e1a7f98e3f9cf35fae58fd931e4c5098f 100644 (file)
@@ -1975,7 +1975,6 @@ xfs_da_do_buf(
                error = mappedbno == -2 ? 0 : XFS_ERROR(EFSCORRUPTED);
                if (unlikely(error == EFSCORRUPTED)) {
                        if (xfs_error_level >= XFS_ERRLEVEL_LOW) {
-                               int     i;
                                cmn_err(CE_ALERT, "xfs_da_do_buf: bno %lld\n",
                                        (long long)bno);
                                cmn_err(CE_ALERT, "dir: inode %lld\n",