summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-07-26 17:02:52 +0200
committerAlex Deucher <alexander.deucher@amd.com>2017-08-15 14:45:53 -0400
commit7ecc245a8ce32ffcaa6a3e5795e0b14db8e076fc (patch)
tree204ca80c53ffa1f78696857021c5c65bc166792a /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentf5e1c740afb6fec8969234a066b1628246a6a08d (diff)
downloadop-kernel-dev-7ecc245a8ce32ffcaa6a3e5795e0b14db8e076fc.zip
op-kernel-dev-7ecc245a8ce32ffcaa6a3e5795e0b14db8e076fc.tar.gz
drm/amdgpu: consistent use u64_to_user_ptr
Instead of open coding the conversion from u64 to pointers. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 917ac5e..88085e7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -689,7 +689,7 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data,
switch (args->op) {
case AMDGPU_GEM_OP_GET_GEM_CREATE_INFO: {
struct drm_amdgpu_gem_create_in info;
- void __user *out = (void __user *)(uintptr_t)args->value;
+ void __user *out = u64_to_user_ptr(args->value);
info.bo_size = robj->gem_base.size;
info.alignment = robj->tbo.mem.page_alignment << PAGE_SHIFT;
OpenPOWER on IntegriCloud