summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
authorChristoph Hellwig2015-06-22 01:44:29 +0200
committerDave Chinner2015-06-22 01:44:29 +0200
commit88ee2df7f2591133731c29d0ee93f3d37691df85 (patch)
tree780e3d17196d016cd543b4ff20acd83a321afe5d /fs/xfs/xfs_buf.c
parentxfs: remove inst_t (diff)
downloadkernel-qcow2-linux-88ee2df7f2591133731c29d0ee93f3d37691df85.tar.gz
kernel-qcow2-linux-88ee2df7f2591133731c29d0ee93f3d37691df85.tar.xz
kernel-qcow2-linux-88ee2df7f2591133731c29d0ee93f3d37691df85.zip
xfs: return a void pointer from xfs_buf_offset
This avoids all kinds of unessecary casts in an envrionment like Linux where we can assume that pointer arithmetics are support on void pointers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 1790b00bea7a..a4b7d92e946c 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1419,9 +1419,9 @@ xfs_buf_submit_wait(
return error;
}
-xfs_caddr_t
+void *
xfs_buf_offset(
- xfs_buf_t *bp,
+ struct xfs_buf *bp,
size_t offset)
{
struct page *page;
@@ -1431,7 +1431,7 @@ xfs_buf_offset(
offset += bp->b_offset;
page = bp->b_pages[offset >> PAGE_SHIFT];
- return (xfs_caddr_t)page_address(page) + (offset & (PAGE_SIZE-1));
+ return page_address(page) + (offset & (PAGE_SIZE-1));
}
/*