diff options
| author | Eric Paris <eparis@redhat.com> | 2013-11-22 18:57:08 -0500 |
|---|---|---|
| committer | Eric Paris <eparis@redhat.com> | 2013-11-22 18:57:54 -0500 |
| commit | fc582aef7dcc27a7120cf232c1e76c569c7b6eab (patch) | |
| tree | 7d275dd4ceab6067b91e9a25a5f6338b425fbccd /include/linux/math64.h | |
| parent | 9175c9d2aed528800175ef81c90569d00d23f9be (diff) | |
| parent | 5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52 (diff) | |
Merge tag 'v3.12'
Linux 3.12
Conflicts:
fs/exec.c
Diffstat (limited to 'include/linux/math64.h')
| -rw-r--r-- | include/linux/math64.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/math64.h b/include/linux/math64.h index 2913b86eb12a..69ed5f5e9f6e 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h | |||
| @@ -31,6 +31,15 @@ static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) | |||
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | /** | 33 | /** |
| 34 | * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder | ||
| 35 | */ | ||
| 36 | static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) | ||
| 37 | { | ||
| 38 | *remainder = dividend % divisor; | ||
| 39 | return dividend / divisor; | ||
| 40 | } | ||
| 41 | |||
| 42 | /** | ||
| 34 | * div64_u64 - unsigned 64bit divide with 64bit divisor | 43 | * div64_u64 - unsigned 64bit divide with 64bit divisor |
| 35 | */ | 44 | */ |
| 36 | static inline u64 div64_u64(u64 dividend, u64 divisor) | 45 | static inline u64 div64_u64(u64 dividend, u64 divisor) |
| @@ -63,6 +72,10 @@ static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) | |||
| 63 | extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder); | 72 | extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder); |
| 64 | #endif | 73 | #endif |
| 65 | 74 | ||
| 75 | #ifndef div64_u64_rem | ||
| 76 | extern u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder); | ||
| 77 | #endif | ||
| 78 | |||
| 66 | #ifndef div64_u64 | 79 | #ifndef div64_u64 |
| 67 | extern u64 div64_u64(u64 dividend, u64 divisor); | 80 | extern u64 div64_u64(u64 dividend, u64 divisor); |
| 68 | #endif | 81 | #endif |
