xfs: remove double-underscore integer types
This is a purely mechanical patch that removes the private __{u,}int{8,16,32,64}_t typedefs in favor of using the system {u,}int{8,16,32,64}_t typedefs. This is the sed script used to perform the transformation and fix the resulting whitespace and indentation errors: s/typedef\t__uint8_t/typedef __uint8_t\t/g s/typedef\t__uint/typedef __uint/g s/typedef\t__int\([0-9]*\)_t/typedef int\1_t\t/g s/__uint8_t\t/__uint8_t\t\t/g s/__uint/uint/g s/__int\([0-9]*\)_t\t/__int\1_t\t\t/g s/__int/int/g /^typedef.*int[0-9]*_t;$/d Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -23,14 +23,6 @@
|
||||
/*
|
||||
* Kernel specific 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 __s64 xfs_off_t; /* <file offset> type */
|
||||
typedef unsigned long long xfs_ino_t; /* <inode> type */
|
||||
@@ -186,22 +178,22 @@ extern struct xstats xfsstats;
|
||||
* are converting to the init_user_ns. The uid is later mapped to a particular
|
||||
* user namespace value when crossing the kernel/user boundary.
|
||||
*/
|
||||
static inline __uint32_t xfs_kuid_to_uid(kuid_t uid)
|
||||
static inline uint32_t xfs_kuid_to_uid(kuid_t uid)
|
||||
{
|
||||
return from_kuid(&init_user_ns, uid);
|
||||
}
|
||||
|
||||
static inline kuid_t xfs_uid_to_kuid(__uint32_t uid)
|
||||
static inline kuid_t xfs_uid_to_kuid(uint32_t uid)
|
||||
{
|
||||
return make_kuid(&init_user_ns, uid);
|
||||
}
|
||||
|
||||
static inline __uint32_t xfs_kgid_to_gid(kgid_t gid)
|
||||
static inline uint32_t xfs_kgid_to_gid(kgid_t gid)
|
||||
{
|
||||
return from_kgid(&init_user_ns, gid);
|
||||
}
|
||||
|
||||
static inline kgid_t xfs_gid_to_kgid(__uint32_t gid)
|
||||
static inline kgid_t xfs_gid_to_kgid(uint32_t gid)
|
||||
{
|
||||
return make_kgid(&init_user_ns, gid);
|
||||
}
|
||||
@@ -231,14 +223,14 @@ static inline __u32 xfs_do_mod(void *a, __u32 b, int n)
|
||||
|
||||
#define do_mod(a, b) xfs_do_mod(&(a), (b), sizeof(a))
|
||||
|
||||
static inline __uint64_t roundup_64(__uint64_t x, __uint32_t y)
|
||||
static inline uint64_t roundup_64(uint64_t x, uint32_t y)
|
||||
{
|
||||
x += y - 1;
|
||||
do_div(x, y);
|
||||
return x * y;
|
||||
}
|
||||
|
||||
static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y)
|
||||
static inline uint64_t howmany_64(uint64_t x, uint32_t y)
|
||||
{
|
||||
x += y - 1;
|
||||
do_div(x, y);
|
||||
|
Reference in New Issue
Block a user