summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-07-30 14:17:41 +0200
committerAlex Deucher <alexander.deucher@amd.com>2018-07-31 16:58:18 -0500
commita0f208453b97565dab8c334ff013aa5ab3c66d0c (patch)
treecc476bf48d6d286d729c807c677a4ad449b0fb6d /drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
parent81c6dabcc990c341793368db985ee8aca5713b16 (diff)
drm/amdgpu: nuke amdgpu_bo_list_free
The RCU grace period is harmless and avoiding it is not worth the effort of doubling the implementation. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
index 556040e45931..5335f1b5459f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
@@ -231,17 +231,6 @@ void amdgpu_bo_list_put(struct amdgpu_bo_list *list)
kref_put(&list->refcount, amdgpu_bo_list_release_rcu);
}
-void amdgpu_bo_list_free(struct amdgpu_bo_list *list)
-{
- unsigned i;
-
- for (i = 0; i < list->num_entries; ++i)
- amdgpu_bo_unref(&list->array[i].robj);
-
- kvfree(list->array);
- kfree(list);
-}
-
int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in,
struct drm_amdgpu_bo_list_entry **info_param)
{
@@ -310,7 +299,7 @@ int amdgpu_bo_list_ioctl(struct drm_device *dev, void *data,
r = idr_alloc(&fpriv->bo_list_handles, list, 1, 0, GFP_KERNEL);
mutex_unlock(&fpriv->bo_list_lock);
if (r < 0) {
- amdgpu_bo_list_free(list);
+ amdgpu_bo_list_put(list);
return r;
}