Mesa (master): etnaviv: drm: Use NSEC_PER_SEC
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun May 10 07:44:43 UTC 2020
Module: Mesa
Branch: master
Commit: 022327f7535a7d27f965af7c318005a56b44ab85
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=022327f7535a7d27f965af7c318005a56b44ab85
Author: Guido Günther <agx at sigxcpu.org>
Date: Thu Jan 23 09:17:07 2020 +0100
etnaviv: drm: Use NSEC_PER_SEC
Signed-off-by: Guido Günther <agx at sigxcpu.org>
Reviewed-by: Jonathan Marek <jonathan at marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3534>
---
src/etnaviv/drm/etnaviv_priv.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/etnaviv/drm/etnaviv_priv.h b/src/etnaviv/drm/etnaviv_priv.h
index 8ceb6c3c431..93bd2d90985 100644
--- a/src/etnaviv/drm/etnaviv_priv.h
+++ b/src/etnaviv/drm/etnaviv_priv.h
@@ -42,6 +42,7 @@
#include "util/list.h"
#include "util/macros.h"
+#include "util/timespec.h"
#include "util/u_atomic.h"
#include "util/u_debug.h"
#include "util/vma.h"
@@ -205,8 +206,8 @@ static inline void get_abs_timeout(struct drm_etnaviv_timespec *tv, uint64_t ns)
{
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
- tv->tv_sec = t.tv_sec + ns / 1000000000;
- tv->tv_nsec = t.tv_nsec + ns % 1000000000;
+ tv->tv_sec = t.tv_sec + ns / NSEC_PER_SEC;
+ tv->tv_nsec = t.tv_nsec + ns % NSEC_PER_SEC;
}
#if HAVE_VALGRIND
More information about the mesa-commit
mailing list