]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ext3: Remove unnecessary casts on bh->b_data
authorNamhyung Kim <namhyung@gmail.com>
Sun, 10 Oct 2010 17:10:45 +0000 (02:10 +0900)
committerJan Kara <jack@suse.cz>
Wed, 27 Oct 2010 23:30:03 +0000 (01:30 +0200)
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>
fs/ext3/balloc.c
fs/ext3/super.c

index 4a32511f4deda7f75b45aeb719d41407e416cb55..a49ce4a7c23d8c8a5b9d9ac30e00aeef08858a4c 100644 (file)
@@ -792,9 +792,9 @@ find_next_usable_block(ext3_grpblk_t start, struct buffer_head *bh,
        if (here < 0)
                here = 0;
 
-       p = ((char *)bh->b_data) + (here >> 3);
+       p = bh->b_data + (here >> 3);
        r = memscan(p, 0, ((maxblocks + 7) >> 3) - (here >> 3));
-       next = (r - ((char *)bh->b_data)) << 3;
+       next = (r - bh->b_data) << 3;
 
        if (next < maxblocks && next >= start && ext3_test_allocatable(next, bh))
                return next;
index daf34b1c4fb538fe8f995e472869824c517a6a77..af7aead1000a93e63710d3012000710769fff4c0 100644 (file)
@@ -1654,7 +1654,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
         * Note: s_es must be initialized as soon as possible because
         *       some ext3 macro-instructions depend on its value
         */
-       es = (struct ext3_super_block *) (((char *)bh->b_data) + offset);
+       es = (struct ext3_super_block *) (bh->b_data + offset);
        sbi->s_es = es;
        sb->s_magic = le16_to_cpu(es->s_magic);
        if (sb->s_magic != EXT3_SUPER_MAGIC)
@@ -1765,7 +1765,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
                               "error: can't read superblock on 2nd try");
                        goto failed_mount;
                }
-               es = (struct ext3_super_block *)(((char *)bh->b_data) + offset);
+               es = (struct ext3_super_block *)(bh->b_data + offset);
                sbi->s_es = es;
                if (es->s_magic != cpu_to_le16(EXT3_SUPER_MAGIC)) {
                        ext3_msg(sb, KERN_ERR,
@@ -2168,7 +2168,7 @@ static journal_t *ext3_get_dev_journal(struct super_block *sb,
                goto out_bdev;
        }
 
-       es = (struct ext3_super_block *) (((char *)bh->b_data) + offset);
+       es = (struct ext3_super_block *) (bh->b_data + offset);
        if ((le16_to_cpu(es->s_magic) != EXT3_SUPER_MAGIC) ||
            !(le32_to_cpu(es->s_feature_incompat) &
              EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)) {