Remove btrfs_csum_ptr() and fold it into it's only caller.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
        return 0;
 }
 
-static u8 *btrfs_csum_ptr(const struct btrfs_fs_info *fs_info, u8 *csums, u64 offset)
-{
-       u64 offset_in_sectors = offset >> fs_info->sectorsize_bits;
-
-       return csums + offset_in_sectors * fs_info->csum_size;
-}
-
 /*
  * Verify the checksum of a single data sector.
  *
                return true;
        }
 
-       csum_expected = btrfs_csum_ptr(fs_info, bbio->csum, bio_offset);
+       csum_expected = bbio->csum + (bio_offset >> fs_info->sectorsize_bits) *
+                               fs_info->csum_size;
        if (btrfs_check_sector_csum(fs_info, bv->bv_page, bv->bv_offset, csum,
                                    csum_expected))
                goto zeroit;