diff options
author | Theodore Ts'o <tytso@mit.edu> | 2012-05-28 17:47:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-05-28 17:47:52 -0400 |
commit | 2716b80284c5ca415b8ce93ca178b0ca28482568 (patch) | |
tree | 51cd4aba2dea62cc5d9fd23b5fb24240c7952175 /fs/ext4 | |
parent | 7e936b737211e6b54e34b71a827e56b872e958d8 (diff) |
ext4: remove redundundant "(char *) bh->b_data" casts
The b_data field of the buffer_head is already a char *, so there's no
point casting it to a char *.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/resize.c | 2 | ||||
-rw-r--r-- | fs/ext4/super.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 05c7979226e5..7ea6cbb44121 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -1145,7 +1145,7 @@ static int ext4_setup_new_descs(handle_t *handle, struct super_block *sb, | |||
1145 | */ | 1145 | */ |
1146 | gdb_bh = sbi->s_group_desc[gdb_num]; | 1146 | gdb_bh = sbi->s_group_desc[gdb_num]; |
1147 | /* Update group descriptor block for new group */ | 1147 | /* Update group descriptor block for new group */ |
1148 | gdp = (struct ext4_group_desc *)((char *)gdb_bh->b_data + | 1148 | gdp = (struct ext4_group_desc *)(gdb_bh->b_data + |
1149 | gdb_off * EXT4_DESC_SIZE(sb)); | 1149 | gdb_off * EXT4_DESC_SIZE(sb)); |
1150 | 1150 | ||
1151 | memset(gdp, 0, EXT4_DESC_SIZE(sb)); | 1151 | memset(gdp, 0, EXT4_DESC_SIZE(sb)); |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index dbc9544c7087..545932c0a290 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -3126,7 +3126,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
3126 | * Note: s_es must be initialized as soon as possible because | 3126 | * Note: s_es must be initialized as soon as possible because |
3127 | * some ext4 macro-instructions depend on its value | 3127 | * some ext4 macro-instructions depend on its value |
3128 | */ | 3128 | */ |
3129 | es = (struct ext4_super_block *) (((char *)bh->b_data) + offset); | 3129 | es = (struct ext4_super_block *) (bh->b_data + offset); |
3130 | sbi->s_es = es; | 3130 | sbi->s_es = es; |
3131 | sb->s_magic = le16_to_cpu(es->s_magic); | 3131 | sb->s_magic = le16_to_cpu(es->s_magic); |
3132 | if (sb->s_magic != EXT4_SUPER_MAGIC) | 3132 | if (sb->s_magic != EXT4_SUPER_MAGIC) |
@@ -3335,7 +3335,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
3335 | "Can't read superblock on 2nd try"); | 3335 | "Can't read superblock on 2nd try"); |
3336 | goto failed_mount; | 3336 | goto failed_mount; |
3337 | } | 3337 | } |
3338 | es = (struct ext4_super_block *)(((char *)bh->b_data) + offset); | 3338 | es = (struct ext4_super_block *)(bh->b_data + offset); |
3339 | sbi->s_es = es; | 3339 | sbi->s_es = es; |
3340 | if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) { | 3340 | if (es->s_magic != cpu_to_le16(EXT4_SUPER_MAGIC)) { |
3341 | ext4_msg(sb, KERN_ERR, | 3341 | ext4_msg(sb, KERN_ERR, |
@@ -3976,7 +3976,7 @@ static journal_t *ext4_get_dev_journal(struct super_block *sb, | |||
3976 | goto out_bdev; | 3976 | goto out_bdev; |
3977 | } | 3977 | } |
3978 | 3978 | ||
3979 | es = (struct ext4_super_block *) (((char *)bh->b_data) + offset); | 3979 | es = (struct ext4_super_block *) (bh->b_data + offset); |
3980 | if ((le16_to_cpu(es->s_magic) != EXT4_SUPER_MAGIC) || | 3980 | if ((le16_to_cpu(es->s_magic) != EXT4_SUPER_MAGIC) || |
3981 | !(le32_to_cpu(es->s_feature_incompat) & | 3981 | !(le32_to_cpu(es->s_feature_incompat) & |
3982 | EXT4_FEATURE_INCOMPAT_JOURNAL_DEV)) { | 3982 | EXT4_FEATURE_INCOMPAT_JOURNAL_DEV)) { |