From 804f570502289f9ccb31660da8d041fa14af6c65 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Tue, 9 Jun 2020 07:52:03 -0500 Subject: drm/nouveau/tmr: fix nvkm_usec/nvkm_msec definitions nvkm_timer_wait_init() takes a u64 as a duration parameter, but the expression "(m) * 1000" will be promoted only to a 32-bit integer, if 'm' is also an integer. Changing the 1000 to 1000ULL ensures that the expression will be 64 bits. This change currently has no effect as there are no callers of nvkm_msec() that exceed 2000ms. Signed-off-by: Timur Tabi Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/nouveau') diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h index a8c21c6c800b..d06dcbe1faa6 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h @@ -63,8 +63,8 @@ s64 nvkm_timer_wait_test(struct nvkm_timer_wait *); dev_WARN(_wait.tmr->subdev.device->dev, "timeout\n"); \ _taken; \ }) -#define nvkm_usec(d,u,cond...) nvkm_nsec((d), (u) * 1000, ##cond) -#define nvkm_msec(d,m,cond...) nvkm_usec((d), (m) * 1000, ##cond) +#define nvkm_usec(d, u, cond...) nvkm_nsec((d), (u) * 1000ULL, ##cond) +#define nvkm_msec(d, m, cond...) nvkm_usec((d), (m) * 1000ULL, ##cond) #define nvkm_wait_nsec(d,n,addr,mask,data) \ nvkm_nsec(d, n, \ -- cgit v1.2.3