Commit ec2c467e authored by Alex Xie's avatar Alex Xie Committed by Alex Deucher

drm/amdgpu: Avoid using signed integer to store pointer value

Signed-off-by: default avatarAlex Xie <AlexBin.Xie@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 81758c55
...@@ -237,7 +237,7 @@ int amdgpu_bo_list_ioctl(struct drm_device *dev, void *data, ...@@ -237,7 +237,7 @@ int amdgpu_bo_list_ioctl(struct drm_device *dev, void *data,
struct amdgpu_fpriv *fpriv = filp->driver_priv; struct amdgpu_fpriv *fpriv = filp->driver_priv;
union drm_amdgpu_bo_list *args = data; union drm_amdgpu_bo_list *args = data;
uint32_t handle = args->in.list_handle; uint32_t handle = args->in.list_handle;
const void __user *uptr = (const void*)(long)args->in.bo_info_ptr; const void __user *uptr = (const void*)(uintptr_t)args->in.bo_info_ptr;
struct drm_amdgpu_bo_list_entry *info; struct drm_amdgpu_bo_list_entry *info;
struct amdgpu_bo_list *list; struct amdgpu_bo_list *list;
......
...@@ -717,7 +717,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data, ...@@ -717,7 +717,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
switch (args->op) { switch (args->op) {
case AMDGPU_GEM_OP_GET_GEM_CREATE_INFO: { case AMDGPU_GEM_OP_GET_GEM_CREATE_INFO: {
struct drm_amdgpu_gem_create_in info; struct drm_amdgpu_gem_create_in info;
void __user *out = (void __user *)(long)args->value; void __user *out = (void __user *)(uintptr_t)args->value;
info.bo_size = robj->gem_base.size; info.bo_size = robj->gem_base.size;
info.alignment = robj->tbo.mem.page_alignment << PAGE_SHIFT; info.alignment = robj->tbo.mem.page_alignment << PAGE_SHIFT;
......
...@@ -237,7 +237,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file ...@@ -237,7 +237,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
struct amdgpu_device *adev = dev->dev_private; struct amdgpu_device *adev = dev->dev_private;
struct drm_amdgpu_info *info = data; struct drm_amdgpu_info *info = data;
struct amdgpu_mode_info *minfo = &adev->mode_info; struct amdgpu_mode_info *minfo = &adev->mode_info;
void __user *out = (void __user *)(long)info->return_pointer; void __user *out = (void __user *)(uintptr_t)info->return_pointer;
uint32_t size = info->return_size; uint32_t size = info->return_size;
struct drm_crtc *crtc; struct drm_crtc *crtc;
uint32_t ui32 = 0; uint32_t ui32 = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment