[PATCH 05/10] amdgpu: Cast pointer to uintptr_t for assignment to unsigned integer
Marek Olšák
maraeo at gmail.com
Tue Jan 12 13:23:51 PST 2016
From: Michel Dänzer <michel.daenzer at amd.com>
CC amdgpu_bo.lo
../../amdgpu/amdgpu_bo.c: In function 'amdgpu_create_bo_from_user_mem':
../../amdgpu/amdgpu_bo.c:539:12: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
args.addr = cpu;
^
Reviewed-by: Jammy Zhou <Jammy.Zhou at amd.com>
---
amdgpu/amdgpu_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index 61db58c..2ae1c18 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -538,7 +538,7 @@ int amdgpu_create_bo_from_user_mem(amdgpu_device_handle dev,
struct amdgpu_bo *bo;
struct drm_amdgpu_gem_userptr args;
- args.addr = cpu;
+ args.addr = (uintptr_t)cpu;
args.flags = AMDGPU_GEM_USERPTR_ANONONLY | AMDGPU_GEM_USERPTR_REGISTER;
args.size = size;
r = drmCommandWriteRead(dev->fd, DRM_AMDGPU_GEM_USERPTR,
--
2.1.4
More information about the dri-devel
mailing list