aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo Krummrich <[email protected]>2023-08-07 18:32:23 +0200
committerDanilo Krummrich <[email protected]>2023-08-08 04:47:14 +0200
commit85b7d20f46ac3b8cbdc921a9e7bb3d1b70ed051d (patch)
tree7c9a9cb0f02207617926955d1dccc18073e63bf8
parent65c54fe0c85520f800091ae8d95b60792918d07a (diff)
drm/nouveau: nvkm: vmm: silence warning from cast
Cast the integer to a pointer-sized type first to keep the compiler happy. Fixes: 6b252cf42281 ("drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm") Reported-by: kernel test robot <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
index 38b7ced934b1..8e459d88ff8f 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
@@ -399,6 +399,8 @@ nvkm_uvmm_mthd_raw_map(struct nvkm_uvmm *uvmm, struct nvif_vmm_raw_v0 *args)
.no_comp = true,
};
struct nvkm_memory *memory;
+ void *argv = (void *)(uintptr_t)args->argv;
+ unsigned int argc = args->argc;
u64 handle = args->memory;
u8 refd;
int ret;
@@ -418,8 +420,7 @@ nvkm_uvmm_mthd_raw_map(struct nvkm_uvmm *uvmm, struct nvif_vmm_raw_v0 *args)
return PTR_ERR(memory);
}
- ret = nvkm_memory_map(memory, args->offset, vmm, &vma,
- (void *)args->argv, args->argc);
+ ret = nvkm_memory_map(memory, args->offset, vmm, &vma, argv, argc);
nvkm_memory_unref(&vma.memory);
nvkm_memory_unref(&memory);