summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/lov
diff options
context:
space:
mode:
authorRoman Storozhenko <romeusmeister@gmail.com>2017-12-19 20:56:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-21 18:22:07 +0100
commita1b475afe31ad3359396b8515ed3c195bdf7772d (patch)
tree9b87da25fe2e7179d52753f8de01d4ef28e33de2 /drivers/staging/lustre/lustre/lov
parent37edc1ccc9e1b61cbcfa8cc6bab463cba397bbe2 (diff)
staging: lustre: Replace 'uint32_t' with 'u32' and 'uint64_t' with 'u64'
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>
Diffstat (limited to 'drivers/staging/lustre/lustre/lov')
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_internal.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h b/drivers/staging/lustre/lustre/lov/lov_internal.h
index ae28ddf80d9b..a56d71c2dda2 100644
--- a/drivers/staging/lustre/lustre/lov/lov_internal.h
+++ b/drivers/staging/lustre/lustre/lov/lov_internal.h
@@ -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); \