diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-06-23 04:11:15 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-07-26 14:16:36 -0400 |
commit | 4e0d5f926b80b06234a4ed664d6ae8c54fb08c4b (patch) | |
tree | 6e8412c8e0dec25e5e895acb3e73fc25855800dd /fs/xfs/xfs_extfree_item.c | |
parent | 898621d5a72c6799a9a13fce20443b4b6699899c (diff) |
xfs: fix the xfs_log_iovec i_addr type
By making this member a void pointer we can get rid of a lot of pointless
casts.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_extfree_item.c')
-rw-r--r-- | fs/xfs/xfs_extfree_item.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c index 61d83c64ed32..a55e687bf562 100644 --- a/fs/xfs/xfs_extfree_item.c +++ b/fs/xfs/xfs_extfree_item.c | |||
@@ -82,7 +82,7 @@ xfs_efi_item_format( | |||
82 | size += (efip->efi_format.efi_nextents - 1) * sizeof(xfs_extent_t); | 82 | size += (efip->efi_format.efi_nextents - 1) * sizeof(xfs_extent_t); |
83 | efip->efi_format.efi_size = 1; | 83 | efip->efi_format.efi_size = 1; |
84 | 84 | ||
85 | log_vector->i_addr = (xfs_caddr_t)&efip->efi_format; | 85 | log_vector->i_addr = &efip->efi_format; |
86 | log_vector->i_len = size; | 86 | log_vector->i_len = size; |
87 | log_vector->i_type = XLOG_REG_TYPE_EFI_FORMAT; | 87 | log_vector->i_type = XLOG_REG_TYPE_EFI_FORMAT; |
88 | ASSERT(size >= sizeof(xfs_efi_log_format_t)); | 88 | ASSERT(size >= sizeof(xfs_efi_log_format_t)); |
@@ -244,7 +244,7 @@ xfs_efi_init( | |||
244 | int | 244 | int |
245 | xfs_efi_copy_format(xfs_log_iovec_t *buf, xfs_efi_log_format_t *dst_efi_fmt) | 245 | xfs_efi_copy_format(xfs_log_iovec_t *buf, xfs_efi_log_format_t *dst_efi_fmt) |
246 | { | 246 | { |
247 | xfs_efi_log_format_t *src_efi_fmt = (xfs_efi_log_format_t *)buf->i_addr; | 247 | xfs_efi_log_format_t *src_efi_fmt = buf->i_addr; |
248 | uint i; | 248 | uint i; |
249 | uint len = sizeof(xfs_efi_log_format_t) + | 249 | uint len = sizeof(xfs_efi_log_format_t) + |
250 | (src_efi_fmt->efi_nextents - 1) * sizeof(xfs_extent_t); | 250 | (src_efi_fmt->efi_nextents - 1) * sizeof(xfs_extent_t); |
@@ -257,8 +257,7 @@ xfs_efi_copy_format(xfs_log_iovec_t *buf, xfs_efi_log_format_t *dst_efi_fmt) | |||
257 | memcpy((char *)dst_efi_fmt, (char*)src_efi_fmt, len); | 257 | memcpy((char *)dst_efi_fmt, (char*)src_efi_fmt, len); |
258 | return 0; | 258 | return 0; |
259 | } else if (buf->i_len == len32) { | 259 | } else if (buf->i_len == len32) { |
260 | xfs_efi_log_format_32_t *src_efi_fmt_32 = | 260 | xfs_efi_log_format_32_t *src_efi_fmt_32 = buf->i_addr; |
261 | (xfs_efi_log_format_32_t *)buf->i_addr; | ||
262 | 261 | ||
263 | dst_efi_fmt->efi_type = src_efi_fmt_32->efi_type; | 262 | dst_efi_fmt->efi_type = src_efi_fmt_32->efi_type; |
264 | dst_efi_fmt->efi_size = src_efi_fmt_32->efi_size; | 263 | dst_efi_fmt->efi_size = src_efi_fmt_32->efi_size; |
@@ -272,8 +271,7 @@ xfs_efi_copy_format(xfs_log_iovec_t *buf, xfs_efi_log_format_t *dst_efi_fmt) | |||
272 | } | 271 | } |
273 | return 0; | 272 | return 0; |
274 | } else if (buf->i_len == len64) { | 273 | } else if (buf->i_len == len64) { |
275 | xfs_efi_log_format_64_t *src_efi_fmt_64 = | 274 | xfs_efi_log_format_64_t *src_efi_fmt_64 = buf->i_addr; |
276 | (xfs_efi_log_format_64_t *)buf->i_addr; | ||
277 | 275 | ||
278 | dst_efi_fmt->efi_type = src_efi_fmt_64->efi_type; | 276 | dst_efi_fmt->efi_type = src_efi_fmt_64->efi_type; |
279 | dst_efi_fmt->efi_size = src_efi_fmt_64->efi_size; | 277 | dst_efi_fmt->efi_size = src_efi_fmt_64->efi_size; |
@@ -373,7 +371,7 @@ xfs_efd_item_format( | |||
373 | size += (efdp->efd_format.efd_nextents - 1) * sizeof(xfs_extent_t); | 371 | size += (efdp->efd_format.efd_nextents - 1) * sizeof(xfs_extent_t); |
374 | efdp->efd_format.efd_size = 1; | 372 | efdp->efd_format.efd_size = 1; |
375 | 373 | ||
376 | log_vector->i_addr = (xfs_caddr_t)&efdp->efd_format; | 374 | log_vector->i_addr = &efdp->efd_format; |
377 | log_vector->i_len = size; | 375 | log_vector->i_len = size; |
378 | log_vector->i_type = XLOG_REG_TYPE_EFD_FORMAT; | 376 | log_vector->i_type = XLOG_REG_TYPE_EFD_FORMAT; |
379 | ASSERT(size >= sizeof(xfs_efd_log_format_t)); | 377 | ASSERT(size >= sizeof(xfs_efd_log_format_t)); |