diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-10-13 18:53:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-13 20:18:22 -0400 |
commit | 73516ace940a7c3f374f3e34c3c03cd3886be62f (patch) | |
tree | cac1eeff6667f743b79051d92abbc505bfa220ec /fs/affs | |
parent | 3bc759931d271dbe9c4156105173b81ecb35177c (diff) |
fs/affs/file.c: fix shadow warnings
Four functions declared variables twice resulting in shadow warnings.
This patch renames internal variables and adds blank line after
declarations.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/affs')
-rw-r--r-- | fs/affs/file.c | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/fs/affs/file.c b/fs/affs/file.c index a7fe57d2cd9a..1ed590aafecf 100644 --- a/fs/affs/file.c +++ b/fs/affs/file.c | |||
@@ -584,11 +584,14 @@ affs_extent_file_ofs(struct inode *inode, u32 newsize) | |||
584 | bh->b_state &= ~(1UL << BH_New); | 584 | bh->b_state &= ~(1UL << BH_New); |
585 | mark_buffer_dirty_inode(bh, inode); | 585 | mark_buffer_dirty_inode(bh, inode); |
586 | if (prev_bh) { | 586 | if (prev_bh) { |
587 | u32 tmp = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next); | 587 | u32 tmp_next = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next); |
588 | if (tmp) | 588 | |
589 | affs_warning(sb, "extent_file_ofs", "next block already set for %d (%d)", bidx, tmp); | 589 | if (tmp_next) |
590 | affs_warning(sb, "extent_file_ofs", | ||
591 | "next block already set for %d (%d)", | ||
592 | bidx, tmp_next); | ||
590 | AFFS_DATA_HEAD(prev_bh)->next = cpu_to_be32(bh->b_blocknr); | 593 | AFFS_DATA_HEAD(prev_bh)->next = cpu_to_be32(bh->b_blocknr); |
591 | affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp); | 594 | affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp_next); |
592 | mark_buffer_dirty_inode(prev_bh, inode); | 595 | mark_buffer_dirty_inode(prev_bh, inode); |
593 | affs_brelse(prev_bh); | 596 | affs_brelse(prev_bh); |
594 | } | 597 | } |
@@ -727,11 +730,14 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping, | |||
727 | AFFS_DATA_HEAD(bh)->next = 0; | 730 | AFFS_DATA_HEAD(bh)->next = 0; |
728 | bh->b_state &= ~(1UL << BH_New); | 731 | bh->b_state &= ~(1UL << BH_New); |
729 | if (prev_bh) { | 732 | if (prev_bh) { |
730 | u32 tmp = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next); | 733 | u32 tmp_next = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next); |
731 | if (tmp) | 734 | |
732 | affs_warning(sb, "commit_write_ofs", "next block already set for %d (%d)", bidx, tmp); | 735 | if (tmp_next) |
736 | affs_warning(sb, "commit_write_ofs", | ||
737 | "next block already set for %d (%d)", | ||
738 | bidx, tmp_next); | ||
733 | AFFS_DATA_HEAD(prev_bh)->next = cpu_to_be32(bh->b_blocknr); | 739 | AFFS_DATA_HEAD(prev_bh)->next = cpu_to_be32(bh->b_blocknr); |
734 | affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp); | 740 | affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp_next); |
735 | mark_buffer_dirty_inode(prev_bh, inode); | 741 | mark_buffer_dirty_inode(prev_bh, inode); |
736 | } | 742 | } |
737 | } | 743 | } |
@@ -758,11 +764,14 @@ static int affs_write_end_ofs(struct file *file, struct address_space *mapping, | |||
758 | AFFS_DATA_HEAD(bh)->next = 0; | 764 | AFFS_DATA_HEAD(bh)->next = 0; |
759 | bh->b_state &= ~(1UL << BH_New); | 765 | bh->b_state &= ~(1UL << BH_New); |
760 | if (prev_bh) { | 766 | if (prev_bh) { |
761 | u32 tmp = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next); | 767 | u32 tmp_next = be32_to_cpu(AFFS_DATA_HEAD(prev_bh)->next); |
762 | if (tmp) | 768 | |
763 | affs_warning(sb, "commit_write_ofs", "next block already set for %d (%d)", bidx, tmp); | 769 | if (tmp_next) |
770 | affs_warning(sb, "commit_write_ofs", | ||
771 | "next block already set for %d (%d)", | ||
772 | bidx, tmp_next); | ||
764 | AFFS_DATA_HEAD(prev_bh)->next = cpu_to_be32(bh->b_blocknr); | 773 | AFFS_DATA_HEAD(prev_bh)->next = cpu_to_be32(bh->b_blocknr); |
765 | affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp); | 774 | affs_adjust_checksum(prev_bh, bh->b_blocknr - tmp_next); |
766 | mark_buffer_dirty_inode(prev_bh, inode); | 775 | mark_buffer_dirty_inode(prev_bh, inode); |
767 | } | 776 | } |
768 | } else if (be32_to_cpu(AFFS_DATA_HEAD(bh)->size) < tmp) | 777 | } else if (be32_to_cpu(AFFS_DATA_HEAD(bh)->size) < tmp) |
@@ -842,12 +851,12 @@ affs_truncate(struct inode *inode) | |||
842 | struct address_space *mapping = inode->i_mapping; | 851 | struct address_space *mapping = inode->i_mapping; |
843 | struct page *page; | 852 | struct page *page; |
844 | void *fsdata; | 853 | void *fsdata; |
845 | loff_t size = inode->i_size; | 854 | loff_t isize = inode->i_size; |
846 | int res; | 855 | int res; |
847 | 856 | ||
848 | res = mapping->a_ops->write_begin(NULL, mapping, size, 0, 0, &page, &fsdata); | 857 | res = mapping->a_ops->write_begin(NULL, mapping, isize, 0, 0, &page, &fsdata); |
849 | if (!res) | 858 | if (!res) |
850 | res = mapping->a_ops->write_end(NULL, mapping, size, 0, 0, page, fsdata); | 859 | res = mapping->a_ops->write_end(NULL, mapping, isize, 0, 0, page, fsdata); |
851 | else | 860 | else |
852 | inode->i_size = AFFS_I(inode)->mmu_private; | 861 | inode->i_size = AFFS_I(inode)->mmu_private; |
853 | mark_inode_dirty(inode); | 862 | mark_inode_dirty(inode); |