[PATCH 05/10] amdgpu: Cast pointer to uintptr_t for assignment to unsigned integer
Michel Dänzer
michel at daenzer.net
Tue Jan 12 19:31:29 PST 2016
On 13.01.2016 06:23, Marek Olšák wrote:
> 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,
>
This patch should be squashed into patch 3.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the dri-devel
mailing list