]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
xfs: remove __psint_t and __psunsigned_t
authorChristoph Hellwig <hch@lst.de>
Sun, 21 Jun 2015 23:43:32 +0000 (09:43 +1000)
committerDave Chinner <david@fromorbit.com>
Sun, 21 Jun 2015 23:43:32 +0000 (09:43 +1000)
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>
fs/xfs/xfs_extfree_item.c
fs/xfs/xfs_linux.h
fs/xfs/xfs_log.c
fs/xfs/xfs_trans_ail.c

index cb7fe64cdbfa0d2cb41c4389ab1b03005c0bbe36..adc8f8fdd145ae4c0facfb377b177fdf3a59baeb 100644 (file)
@@ -239,7 +239,7 @@ xfs_efi_init(
 
        xfs_log_item_init(mp, &efip->efi_item, XFS_LI_EFI, &xfs_efi_item_ops);
        efip->efi_format.efi_nextents = nextents;
-       efip->efi_format.efi_id = (__psint_t)(void*)efip;
+       efip->efi_format.efi_id = (uintptr_t)(void *)efip;
        atomic_set(&efip->efi_next_extent, 0);
        atomic_set(&efip->efi_refcount, 2);
 
index 7c7842c85a082f92c99b25f6ca818c1bf32a7224..1637a95c1e0ce1ef6a9a7e3e22623bba3d93958d 100644 (file)
@@ -41,17 +41,6 @@ typedef char *                       xfs_caddr_t;    /* <core address> type */
 typedef __u32                  xfs_dev_t;
 typedef __u32                  xfs_nlink_t;
 
-/* __psint_t is the same size as a pointer */
-#if (BITS_PER_LONG == 32)
-typedef __int32_t __psint_t;
-typedef __uint32_t __psunsigned_t;
-#elif (BITS_PER_LONG == 64)
-typedef __int64_t __psint_t;
-typedef __uint64_t __psunsigned_t;
-#else
-#error BITS_PER_LONG must be 32 or 64
-#endif
-
 #include "xfs_types.h"
 
 #include "kmem.h"
index bcc7cfabb787079c5a0bf1dd9b4da3c2b159bcd8..eafd83b9d937e3ade74187f2b0ce2ea82f26f3df 100644 (file)
@@ -3769,7 +3769,7 @@ xlog_verify_iclog(
        xlog_in_core_2_t        *xhdr;
        xfs_caddr_t             ptr;
        xfs_caddr_t             base_ptr;
-       __psint_t               field_offset;
+       ptrdiff_t               field_offset;
        __uint8_t               clientid;
        int                     len, i, j, k, op_len;
        int                     idx;
@@ -3806,7 +3806,7 @@ xlog_verify_iclog(
                ophead = (xlog_op_header_t *)ptr;
 
                /* clientid is only 1 byte */
-               field_offset = (__psint_t)
+               field_offset = (ptrdiff_t)
                               ((xfs_caddr_t)&(ophead->oh_clientid) - base_ptr);
                if (!syncing || (field_offset & 0x1ff)) {
                        clientid = ophead->oh_clientid;
@@ -3829,13 +3829,13 @@ xlog_verify_iclog(
                                (unsigned long)field_offset);
 
                /* check length */
-               field_offset = (__psint_t)
+               field_offset = (ptrdiff_t)
                               ((xfs_caddr_t)&(ophead->oh_len) - base_ptr);
                if (!syncing || (field_offset & 0x1ff)) {
                        op_len = be32_to_cpu(ophead->oh_len);
                } else {
-                       idx = BTOBBT((__psint_t)&ophead->oh_len -
-                                   (__psint_t)iclog->ic_datap);
+                       idx = BTOBBT((uintptr_t)&ophead->oh_len -
+                                   (uintptr_t)iclog->ic_datap);
                        if (idx >= (XLOG_HEADER_CYCLE_SIZE / BBSIZE)) {
                                j = idx / (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
                                k = idx % (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
index 573aefb5a5731d37fa79fa6fb8a522fb29a43848..1098cf4901892830184c0a3f2306210be1930f9f 100644 (file)
@@ -159,7 +159,7 @@ xfs_trans_ail_cursor_next(
 {
        struct xfs_log_item     *lip = cur->item;
 
-       if ((__psint_t)lip & 1)
+       if ((uintptr_t)lip & 1)
                lip = xfs_ail_min(ailp);
        if (lip)
                cur->item = xfs_ail_next(ailp, lip);
@@ -196,7 +196,7 @@ xfs_trans_ail_cursor_clear(
        list_for_each_entry(cur, &ailp->xa_cursors, list) {
                if (cur->item == lip)
                        cur->item = (struct xfs_log_item *)
-                                       ((__psint_t)cur->item | 1);
+                                       ((uintptr_t)cur->item | 1);
        }
 }
 
@@ -287,7 +287,7 @@ xfs_ail_splice(
         * find the place in the AIL where the items belong.
         */
        lip = cur ? cur->item : NULL;
-       if (!lip || (__psint_t) lip & 1)
+       if (!lip || (uintptr_t)lip & 1)
                lip = __xfs_trans_ail_cursor_last(ailp, lsn);
 
        /*