Skip to contentSkip to conversation

drm/amdgpu/userq: remove the unused variable from cleanup fn

PATCH In review Sunil Khatri 2 participants 2 messages Mar 2

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/userq: remove the unused variable from cleanup fn

Remove the queue_id which is no more needed in amdgpu_userq_cleanup fn.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +3 -4
index 9eced6cad8fe..0ff774b26145 100644
@@ -446,8 +446,7 @@ static int amdgpu_userq_wait_for_last_fence(struct amdgpu_usermode_queue *queue)
 	return ret;
 }
 
-static void amdgpu_userq_cleanup(struct amdgpu_usermode_queue *queue,
-				 u32 queue_id)
+static void amdgpu_userq_cleanup(struct amdgpu_usermode_queue *queue)
 {
 	struct amdgpu_userq_mgr *uq_mgr = queue->userq_mgr;
 	struct amdgpu_device *adev = uq_mgr->adev;
@@ -657,7 +656,7 @@ amdgpu_userq_destroy(struct amdgpu_userq_mgr *uq_mgr, struct amdgpu_usermode_que
 		drm_warn(adev_to_drm(uq_mgr->adev), "trying to destroy a HW mapping userq\n");
 		queue->state = AMDGPU_USERQ_STATE_HUNG;
 	}
-	amdgpu_userq_cleanup(queue, queue_id);
+	amdgpu_userq_cleanup(queue);
 	mutex_unlock(&uq_mgr->userq_mutex);
 
 	pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
@@ -1410,7 +1409,7 @@ void amdgpu_userq_mgr_fini(struct amdgpu_userq_mgr *userq_mgr)
 			continue;
 		amdgpu_userq_wait_for_last_fence(queue);
 		amdgpu_userq_unmap_helper(queue);
-		amdgpu_userq_cleanup(queue, queue_id);
+		amdgpu_userq_cleanup(queue);
 		amdgpu_userq_put(userq_mgr, queue_id);
 		/* Second put is for the reference taken in this function itself */
 		amdgpu_userq_put(userq_mgr, queue_id);
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Sunil Khatri

Remove the queue_id which is no more needed in amdgpu_userq_cleanup fn.

This should really be patch 2/2 since it depends on the ref count patch.

Quoted 39 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +3 -5
index 9eced6cad8fe..0ff774b26145 100644
@@ -446,8 +446,7 @@ static int amdgpu_userq_wait_for_last_fence(struct amdgpu_usermode_queue *queue)
        return ret;
 }
 
-static void amdgpu_userq_cleanup(struct amdgpu_usermode_queue *queue,
-                                u32 queue_id)
+static void amdgpu_userq_cleanup(struct amdgpu_usermode_queue *queue)
 {
        struct amdgpu_userq_mgr *uq_mgr = queue->userq_mgr;
        struct amdgpu_device *adev = uq_mgr->adev;
@@ -657,7 +656,7 @@ amdgpu_userq_destroy(struct amdgpu_userq_mgr *uq_mgr, struct amdgpu_usermode_que
                drm_warn(adev_to_drm(uq_mgr->adev), "trying to destroy a HW mapping userq\n");
                queue->state = AMDGPU_USERQ_STATE_HUNG;
        }
-       amdgpu_userq_cleanup(queue, queue_id);
+       amdgpu_userq_cleanup(queue);
        mutex_unlock(&uq_mgr->userq_mutex);
 
        pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
@@ -1410,7 +1409,7 @@ void amdgpu_userq_mgr_fini(struct amdgpu_userq_mgr *userq_mgr)
                        continue;
                amdgpu_userq_wait_for_last_fence(queue);
                amdgpu_userq_unmap_helper(queue);
-               amdgpu_userq_cleanup(queue, queue_id);
+               amdgpu_userq_cleanup(queue);
                amdgpu_userq_put(userq_mgr, queue_id);
                /* Second put is for the reference taken in this function itself */
                amdgpu_userq_put(userq_mgr, queue_id);
--

2.34.1