From: Francois Dugast Date: Fri, 9 Aug 2024 15:51:30 +0000 (+0200) Subject: drm/xe/exec_queue: Remove duplicated code X-Git-Tag: v6.12-rc1~126^2~15^2~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f0d7bee2079fc899c8280e177b0c0feb8b9debe;p=thirdparty%2Fkernel%2Flinux.git drm/xe/exec_queue: Remove duplicated code This code section is the same as the body of xe_exec_queue_last_fence_put_unlocked() so call the function instead and remove duplicated code to make maintenance easier. Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240809155156.1955925-6-francois.dugast@intel.com --- diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c index ebc80add10aca..3ce4582504f9e 100644 --- a/drivers/gpu/drm/xe/xe_exec_queue.c +++ b/drivers/gpu/drm/xe/xe_exec_queue.c @@ -852,10 +852,7 @@ void xe_exec_queue_last_fence_put(struct xe_exec_queue *q, struct xe_vm *vm) { xe_exec_queue_last_fence_lockdep_assert(q, vm); - if (q->last_fence) { - dma_fence_put(q->last_fence); - q->last_fence = NULL; - } + xe_exec_queue_last_fence_put_unlocked(q); } /**