Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfs: remove __psint_t and __psunsigned_t

Replace uses of __psint_t with the proper uintptr_t and ptrdiff_t types,
and remove the defintions of __psint_t and __psunsigned_t.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>

authored by

Christoph Hellwig and committed by
Dave Chinner
db9d67d6 2ac56d3d

+9 -20
+1 -1
fs/xfs/xfs_extfree_item.c
··· 239 239 240 240 xfs_log_item_init(mp, &efip->efi_item, XFS_LI_EFI, &xfs_efi_item_ops); 241 241 efip->efi_format.efi_nextents = nextents; 242 - efip->efi_format.efi_id = (__psint_t)(void*)efip; 242 + efip->efi_format.efi_id = (uintptr_t)(void *)efip; 243 243 atomic_set(&efip->efi_next_extent, 0); 244 244 atomic_set(&efip->efi_refcount, 2); 245 245
-11
fs/xfs/xfs_linux.h
··· 41 41 typedef __u32 xfs_dev_t; 42 42 typedef __u32 xfs_nlink_t; 43 43 44 - /* __psint_t is the same size as a pointer */ 45 - #if (BITS_PER_LONG == 32) 46 - typedef __int32_t __psint_t; 47 - typedef __uint32_t __psunsigned_t; 48 - #elif (BITS_PER_LONG == 64) 49 - typedef __int64_t __psint_t; 50 - typedef __uint64_t __psunsigned_t; 51 - #else 52 - #error BITS_PER_LONG must be 32 or 64 53 - #endif 54 - 55 44 #include "xfs_types.h" 56 45 57 46 #include "kmem.h"
+5 -5
fs/xfs/xfs_log.c
··· 3769 3769 xlog_in_core_2_t *xhdr; 3770 3770 xfs_caddr_t ptr; 3771 3771 xfs_caddr_t base_ptr; 3772 - __psint_t field_offset; 3772 + ptrdiff_t field_offset; 3773 3773 __uint8_t clientid; 3774 3774 int len, i, j, k, op_len; 3775 3775 int idx; ··· 3806 3806 ophead = (xlog_op_header_t *)ptr; 3807 3807 3808 3808 /* clientid is only 1 byte */ 3809 - field_offset = (__psint_t) 3809 + field_offset = (ptrdiff_t) 3810 3810 ((xfs_caddr_t)&(ophead->oh_clientid) - base_ptr); 3811 3811 if (!syncing || (field_offset & 0x1ff)) { 3812 3812 clientid = ophead->oh_clientid; ··· 3829 3829 (unsigned long)field_offset); 3830 3830 3831 3831 /* check length */ 3832 - field_offset = (__psint_t) 3832 + field_offset = (ptrdiff_t) 3833 3833 ((xfs_caddr_t)&(ophead->oh_len) - base_ptr); 3834 3834 if (!syncing || (field_offset & 0x1ff)) { 3835 3835 op_len = be32_to_cpu(ophead->oh_len); 3836 3836 } else { 3837 - idx = BTOBBT((__psint_t)&ophead->oh_len - 3838 - (__psint_t)iclog->ic_datap); 3837 + idx = BTOBBT((uintptr_t)&ophead->oh_len - 3838 + (uintptr_t)iclog->ic_datap); 3839 3839 if (idx >= (XLOG_HEADER_CYCLE_SIZE / BBSIZE)) { 3840 3840 j = idx / (XLOG_HEADER_CYCLE_SIZE / BBSIZE); 3841 3841 k = idx % (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
+3 -3
fs/xfs/xfs_trans_ail.c
··· 159 159 { 160 160 struct xfs_log_item *lip = cur->item; 161 161 162 - if ((__psint_t)lip & 1) 162 + if ((uintptr_t)lip & 1) 163 163 lip = xfs_ail_min(ailp); 164 164 if (lip) 165 165 cur->item = xfs_ail_next(ailp, lip); ··· 196 196 list_for_each_entry(cur, &ailp->xa_cursors, list) { 197 197 if (cur->item == lip) 198 198 cur->item = (struct xfs_log_item *) 199 - ((__psint_t)cur->item | 1); 199 + ((uintptr_t)cur->item | 1); 200 200 } 201 201 } 202 202 ··· 287 287 * find the place in the AIL where the items belong. 288 288 */ 289 289 lip = cur ? cur->item : NULL; 290 - if (!lip || (__psint_t) lip & 1) 290 + if (!lip || (uintptr_t)lip & 1) 291 291 lip = __xfs_trans_ail_cursor_last(ailp, lsn); 292 292 293 293 /*