staging: lustre: Replace 'uint32_t' with 'u32' and 'uint64_t' with 'u64'
authorRoman Storozhenko <romeusmeister@gmail.com>
Tue, 19 Dec 2017 17:56:54 +0000 (20:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Dec 2017 17:22:07 +0000 (18:22 +0100)
There are two reasons for replacing 'uint32_t' with 'u32'
and 'uint64_t' with 'u64':

1) As Linus Torvalds have said we should use kernel types:
http://lkml.iu.edu/hypermail//linux/kernel/1506.0/00160.html

2) There are only few places in the lustre codebase that use such types.
In the most cases it uses 'u32' and 'u64'.

Signed-off-by: Roman Storozhenko <romeusmeister@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_sec.h
drivers/staging/lustre/lustre/llite/vvp_dev.c
drivers/staging/lustre/lustre/lov/lov_internal.h
drivers/staging/lustre/lustre/osc/osc_internal.h

index a40f706a53a1e9adcba259033716714c30238e25..64b6fd4fed8f7a4670c05be3c324d09028dd2f4b 100644 (file)
@@ -341,8 +341,8 @@ void sptlrpc_conf_client_adapt(struct obd_device *obd);
 #define SPTLRPC_MAX_PAYLOAD     (1024)
 
 struct vfs_cred {
-       uint32_t        vc_uid;
-       uint32_t        vc_gid;
+       u32     vc_uid;
+       u32     vc_gid;
 };
 
 struct ptlrpc_ctx_ops {
index 8ccc8b799c026cab94ff719ce555e8990b774a12..987c03b058e6f719907262bdd4449f7323db9948 100644 (file)
@@ -384,7 +384,7 @@ int cl_sb_fini(struct super_block *sb)
 struct vvp_pgcache_id {
        unsigned int             vpi_bucket;
        unsigned int             vpi_depth;
-       uint32_t                 vpi_index;
+       u32                      vpi_index;
 
        unsigned int             vpi_curdep;
        struct lu_object_header *vpi_obj;
index ae28ddf80d9b3eb110cca0c70831647eee7d3195..a56d71c2dda2b0f8bec7164d6b79fb01ee0cd851 100644 (file)
@@ -115,19 +115,19 @@ static inline const struct lsm_operations *lsm_op_find(int magic)
  */
 #if BITS_PER_LONG == 64
 # define lov_do_div64(n, base) ({                                      \
-       uint64_t __base = (base);                                       \
-       uint64_t __rem;                                                 \
-       __rem = ((uint64_t)(n)) % __base;                               \
-       (n) = ((uint64_t)(n)) / __base;                                 \
+       u64 __base = (base);                                    \
+       u64 __rem;                                                      \
+       __rem = ((u64)(n)) % __base;                            \
+       (n) = ((u64)(n)) / __base;                                      \
        __rem;                                                          \
 })
 #elif BITS_PER_LONG == 32
 # define lov_do_div64(n, base) ({                                      \
-       uint64_t __rem;                                                 \
+       u64 __rem;                                                      \
        if ((sizeof(base) > 4) && (((base) & 0xffffffff00000000ULL) != 0)) {  \
                int __remainder;                                              \
                LASSERTF(!((base) & (LOV_MIN_STRIPE_SIZE - 1)), "64 bit lov " \
-                        "division %llu / %llu\n", (n), (uint64_t)(base));    \
+                        "division %llu / %llu\n", (n), (u64)(base));    \
                __remainder = (n) & (LOV_MIN_STRIPE_SIZE - 1);          \
                (n) >>= LOV_MIN_STRIPE_BITS;                            \
                __rem = do_div(n, (base) >> LOV_MIN_STRIPE_BITS);       \
index feda61bcdb9b8af7c518de128ce414dbe1a868b0..32db150fd42ec37aa80b3f736c07a4f43cec31bc 100644 (file)
@@ -168,9 +168,9 @@ struct osc_device {
 
        /* Write stats is actually protected by client_obd's lock. */
        struct osc_stats {
-               uint64_t     os_lockless_writes;          /* by bytes */
-               uint64_t     os_lockless_reads;    /* by bytes */
-               uint64_t     os_lockless_truncates;       /* by times */
+               u64     os_lockless_writes;       /* by bytes */
+               u64     os_lockless_reads;        /* by bytes */
+               u64     os_lockless_truncates;    /* by times */
        } od_stats;
 
        /* configuration item(s) */