aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-02-24 13:45:15 -0500
committerDavid Sterba <dsterba@suse.cz>2015-03-03 11:24:35 -0500
commit258ece02126a67af263746e1ae5f8ddf0d492e14 (patch)
tree925c2ccfbad05c1e27f7bc9ad5495165aa35c2b3 /fs
parent093adbcedf123f366e5eef0c4ccd815920f725f3 (diff)
btrfs: remove shadowing variables in __btrfs_map_block
1) We can safely use the function's 'i'. Fixes warning fs/btrfs/volumes.c:5257:7: warning: declaration of 'i' shadows a previous local fs/btrfs/volumes.c:4951:6: warning: shadowed declaration is here 2) A local variable duplicates name of an argument, we can use the value directly. Fixes warning fs/btrfs/volumes.c:5433:8: warning: declaration of 'length' shadows a parameter fs/btrfs/volumes.c:4935:27: warning: shadowed declaration is here Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/volumes.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 3df83539f532..64ec2fd624da 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5262,7 +5262,6 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
5262 need_raid_map && ((rw & (REQ_WRITE | REQ_GET_READ_MIRRORS)) || 5262 need_raid_map && ((rw & (REQ_WRITE | REQ_GET_READ_MIRRORS)) ||
5263 mirror_num > 1)) { 5263 mirror_num > 1)) {
5264 u64 tmp; 5264 u64 tmp;
5265 int i;
5266 unsigned rot; 5265 unsigned rot;
5267 5266
5268 bbio->raid_map = (u64 *)((void *)bbio->stripes + 5267 bbio->raid_map = (u64 *)((void *)bbio->stripes +
@@ -5438,9 +5437,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
5438 } 5437 }
5439 } 5438 }
5440 if (found) { 5439 if (found) {
5441 u64 length = map->stripe_len; 5440 if (physical_of_found + map->stripe_len <=
5442
5443 if (physical_of_found + length <=
5444 dev_replace->cursor_left) { 5441 dev_replace->cursor_left) {
5445 struct btrfs_bio_stripe *tgtdev_stripe = 5442 struct btrfs_bio_stripe *tgtdev_stripe =
5446 bbio->stripes + num_stripes; 5443 bbio->stripes + num_stripes;