[Top] [All Lists]

[PATCH 39/55] xfs: move kernel specific type definitions to xfs.h

To: xfs@xxxxxxxxxxx
Subject: [PATCH 39/55] xfs: move kernel specific type definitions to xfs.h
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 5 Sep 2013 08:05:43 +1000
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1378332359-14737-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1378332359-14737-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

xfs_types.h is shared with userspace, so having kernel specific
types defined in it is problematic. Move all the kernel specific
defines to xfs_linux.h so we can remove the __KERNEL__ guards from

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
 include/xfs_types.h | 36 ------------------------------------
 1 file changed, 36 deletions(-)

diff --git a/include/xfs_types.h b/include/xfs_types.h
index 6ed6b26..ce44b18 100644
--- a/include/xfs_types.h
+++ b/include/xfs_types.h
@@ -18,42 +18,6 @@
 #ifndef __XFS_TYPES_H__
 #define        __XFS_TYPES_H__
-#ifdef __KERNEL__
- * Additional type declarations for XFS
- */
-typedef signed char            __int8_t;
-typedef unsigned char          __uint8_t;
-typedef signed short int       __int16_t;
-typedef unsigned short int     __uint16_t;
-typedef signed int             __int32_t;
-typedef unsigned int           __uint32_t;
-typedef signed long long int   __int64_t;
-typedef unsigned long long int __uint64_t;
-typedef __uint32_t             inst_t;         /* an instruction */
-typedef __s64                  xfs_off_t;      /* <file offset> type */
-typedef unsigned long long     xfs_ino_t;      /* <inode> type */
-typedef __s64                  xfs_daddr_t;    /* <disk address> type */
-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;
-#error BITS_PER_LONG must be 32 or 64
-#endif /* __KERNEL__ */
 typedef __uint32_t     prid_t;         /* project ID */
 typedef __uint32_t     xfs_agblock_t;  /* blockno in alloc. group */

<Prev in Thread] Current Thread [Next in Thread>