aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-10-10 13:10:45 -0400
committerJan Kara <jack@suse.cz>2010-10-27 19:30:03 -0400
commit57e94d8647e9aa60ad317ccd0cd54eefd603f1fe (patch)
tree6151046672c86109497bfbb08f61be7585251d51 /fs/ext3
parentdf0d6b8ff152b1a1aaae17c27a445ad025a358bd (diff)
ext3: Remove unnecessary casts on bh->b_data
bh->b_data is already a pointer to char so casts to 'char *' should be meaningless. Remove them. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/balloc.c4
-rw-r--r--fs/ext3/super.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 4a32511f4ded..a49ce4a7c23d 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -792,9 +792,9 @@ find_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh,
792 if (here < 0) 792 if (here < 0)
793 here = 0; 793 here = 0;
794 794
795 p = ((char *)bh->b_data) + (here >> 3); 795 p = bh->b_data + (here >> 3);
796 r = memscan(p, 0, ((maxblocks + 7) >> 3) - (here >> 3)); 796 r = memscan(p, 0, ((maxblocks + 7) >> 3) - (here >> 3));
797 next = (r - ((char *)bh->b_data)) << 3; 797 next = (r - bh->b_data) << 3;
798 798
799 if (next < maxblocks && next >= start && ext3_test_allocatable(next, bh)) 799 if (next < maxblocks && next >= start && ext3_test_allocatable(next, bh))
800 return next; 800 return next;
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index daf34b1c4fb5..af7aead1000a 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -1654,7 +1654,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
1654 * Note: s_es must be initialized as soon as possible because 1654 * Note: s_es must be initialized as soon as possible because
1655 * some ext3 macro-instructions depend on its value 1655 * some ext3 macro-instructions depend on its value
1656 */ 1656 */
1657 es = (struct ext3_super_block *) (((char *)bh->b_data) + offset); 1657 es = (struct ext3_super_block *) (bh->b_data + offset);
1658 sbi->s_es = es; 1658 sbi->s_es = es;
1659 sb->s_magic = le16_to_cpu(es->s_magic); 1659 sb->s_magic = le16_to_cpu(es->s_magic);
1660 if (sb->s_magic != EXT3_SUPER_MAGIC) 1660 if (sb->s_magic != EXT3_SUPER_MAGIC)
@@ -1765,7 +1765,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
1765 "error: can't read superblock on 2nd try"); 1765 "error: can't read superblock on 2nd try");
1766 goto failed_mount; 1766 goto failed_mount;
1767 } 1767 }
1768 es = (struct ext3_super_block *)(((char *)bh->b_data) + offset); 1768 es = (struct ext3_super_block *)(bh->b_data + offset);
1769 sbi->s_es = es; 1769 sbi->s_es = es;
1770 if (es->s_magic != cpu_to_le16(EXT3_SUPER_MAGIC)) { 1770 if (es->s_magic != cpu_to_le16(EXT3_SUPER_MAGIC)) {
1771 ext3_msg(sb, KERN_ERR, 1771 ext3_msg(sb, KERN_ERR,
@@ -2168,7 +2168,7 @@ static journal_t *ext3_get_dev_journal(struct super_block *sb,
2168 goto out_bdev; 2168 goto out_bdev;
2169 } 2169 }
2170 2170
2171 es = (struct ext3_super_block *) (((char *)bh->b_data) + offset); 2171 es = (struct ext3_super_block *) (bh->b_data + offset);
2172 if ((le16_to_cpu(es->s_magic) != EXT3_SUPER_MAGIC) || 2172 if ((le16_to_cpu(es->s_magic) != EXT3_SUPER_MAGIC) ||
2173 !(le32_to_cpu(es->s_feature_incompat) & 2173 !(le32_to_cpu(es->s_feature_incompat) &
2174 EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) { 2174 EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {