diff options
author | Simon Glass <sjg@chromium.org> | 2019-04-08 13:20:48 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-04-23 20:26:43 -0600 |
commit | ca49b2c6e2cc66d7b84e7559cadfc8bf792a2170 (patch) | |
tree | 14a81b1e1947281f503f24d3d4069edc95500b33 /lib/div64.c | |
parent | 315f60d741a7c16bc44cee87668a02054d8f9f08 (diff) | |
download | u-boot-ca49b2c6e2cc66d7b84e7559cadfc8bf792a2170.tar.gz |
div64: Use kernel types
These functions still use uint32_t and uint64_t but checkpatch now
requests that the kernel types be used instead. Update them as well as a
few resulting checkpatch errors.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/div64.c')
-rw-r--r-- | lib/div64.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/div64.c b/lib/div64.c index 206f582ca9..7abc68c333 100644 --- a/lib/div64.c +++ b/lib/div64.c @@ -25,19 +25,19 @@ #if BITS_PER_LONG == 32 #ifndef __div64_32 -uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base) +u32 __attribute__((weak)) __div64_32(u64 *n, u32 base) { - uint64_t rem = *n; - uint64_t b = base; - uint64_t res, d = 1; - uint32_t high = rem >> 32; + u64 rem = *n; + u64 b = base; + u64 res, d = 1; + u32 high = rem >> 32; /* Reduce the thing a bit first */ res = 0; if (high >= base) { high /= base; - res = (uint64_t) high << 32; - rem -= (uint64_t) (high*base) << 32; + res = (u64)high << 32; + rem -= (u64)(high * base) << 32; } while ((int64_t)b > 0 && b < rem) { |