mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-03-10 00:00:04 +03:00
include/linux/time64.h: no need for __iter_div_u64_rem in userspace
This commit is contained in:
parent
c725c69d77
commit
71c55882fa
@ -191,8 +191,8 @@ extern struct timespec64 ns_to_timespec64(const s64 nsec);
|
|||||||
*/
|
*/
|
||||||
static __always_inline void timespec64_add_ns(struct timespec64 *a, u64 ns)
|
static __always_inline void timespec64_add_ns(struct timespec64 *a, u64 ns)
|
||||||
{
|
{
|
||||||
a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns);
|
a->tv_sec += (a->tv_nsec + ns) / NSEC_PER_SEC;
|
||||||
a->tv_nsec = ns;
|
a->tv_nsec += (a->tv_nsec + ns) % NSEC_PER_SEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user