diff mbox

[1/2] ext4: fix usless declarations

Message ID 1364986711-3630-1-git-send-email-dmonakhov@openvz.org
State Accepted, archived
Headers show

Commit Message

Dmitry Monakhov April 3, 2013, 10:58 a.m. UTC
This patch should fix sparse complains about shadow declatations.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 fs/ext4/ialloc.c      |    1 -
 fs/ext4/ioctl.c       |    1 -
 fs/ext4/mballoc.c     |    1 -
 fs/ext4/move_extent.c |    1 -
 4 files changed, 0 insertions(+), 4 deletions(-)

Comments

Theodore Ts'o April 3, 2013, 12:26 p.m. UTC | #1
On Wed, Apr 03, 2013 at 02:58:30PM +0400, Dmitry Monakhov wrote:
> This patch should fix sparse complains about shadow declatations.

Nothing here is fixing serious regressions, right?  This is just to
make static code checkers happy?

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dmitry Monakhov April 3, 2013, 12:31 p.m. UTC | #2
On Wed, 3 Apr 2013 08:26:41 -0400, Theodore Ts'o <tytso@mit.edu> wrote:
> On Wed, Apr 03, 2013 at 02:58:30PM +0400, Dmitry Monakhov wrote:
> > This patch should fix sparse complains about shadow declatations.
> 
> Nothing here is fixing serious regressions, right?  This is just to
> make static code checkers happy?
Yep... but fixes are also quite simple.
> 
> 						- Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o April 10, 2013, 2:50 a.m. UTC | #3
On Wed, Apr 03, 2013 at 12:58:30AM -0000, Dmitri Monakho wrote:
> This patch should fix sparse complains about shadow declatations.
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>

Applied to the dev branch, thanks.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 6c5bb8d..4c358f7 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -899,7 +899,6 @@  got:
 	if (EXT4_HAS_RO_COMPAT_FEATURE(sb,
 			EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) {
 		__u32 csum;
-		struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
 		__le32 inum = cpu_to_le32(inode->i_ino);
 		__le32 gen = cpu_to_le32(inode->i_generation);
 		csum = ext4_chksum(sbi, sbi->s_csum_seed, (__u8 *)&inum,
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index a07b7bc..fb4e77f 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -355,7 +355,6 @@  group_add_out:
 
 	case EXT4_IOC_RESIZE_FS: {
 		ext4_fsblk_t n_blocks_count;
-		struct super_block *sb = inode->i_sb;
 		int err = 0, err2 = 0;
 		ext4_group_t o_group = EXT4_SB(sb)->s_groups_count;
 
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 580aada..5bf8056 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -860,7 +860,6 @@  static int ext4_mb_init_cache(struct page *page, char *incore)
 
 	first_block = page->index * blocks_per_page;
 	for (i = 0; i < blocks_per_page; i++) {
-		int group;
 
 		group = (first_block + i) >> 1;
 		if (group >= ngroups)
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index 33e1c08..7f3ed63 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -856,7 +856,6 @@  mext_page_mkuptodate(struct page *page, unsigned from, unsigned to)
 		if (buffer_uptodate(bh))
 			continue;
 		if (!buffer_mapped(bh)) {
-			int err = 0;
 			err = ext4_get_block(inode, block, bh, 0);
 			if (err) {
 				SetPageError(page);