All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: alex.zuo@intel.com, jonathan.cavitt@intel.com,
	matthew.brost@intel.com, himal.prasad.ghimiray@intel.com,
	shuicheng.lin@intel.com, dev@lankhorst.se
Subject: [PATCH] drm/xe/vm: Do not dma_fence_put zero fences in err_out path
Date: Wed, 30 Sep 2026 04:56:06 +0800	[thread overview]
Message-ID: <20260929205606.1076177-1-jonathan.cavitt@intel.com> (raw)

It is not necessary to iterate over and dma_fence_put current_fence
fences in the err_out path of ops_execute because current_fences cannot
be non-zero when jumping to that section of code.

Caught by static analysis.

Fixes: f5708e761ed6 ("drm/xe: Add CPU bind layer")
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: Maarten Lankhorst <dev@lankhorst.se>
---
 drivers/gpu/drm/xe/xe_vm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 425c678f4480..f159970bd34e 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -3575,8 +3575,6 @@ static struct dma_fence *ops_execute(struct xe_vm *vm,
 
 err_out:
 	xe_pt_update_ops_abort(xe, vops);
-	while (current_fence)
-		dma_fence_put(fences[--current_fence]);
 	kfree(fences);
 	kfree(cf);
 
-- 
2.43.0


             reply	other threads:[~2026-09-29 20:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 20:56 Jonathan Cavitt [this message]
2026-09-29 21:00 ` [PATCH] drm/xe/vm: Do not dma_fence_put zero fences in err_out path Matthew Brost
2026-09-29 21:07   ` Cavitt, Jonathan
2026-09-29 21:38 ` ✓ CI.KUnit: success for " Patchwork
2026-09-29 23:29 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-09-30  4:27 ` ✗ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260929205606.1076177-1-jonathan.cavitt@intel.com \
    --to=jonathan.cavitt@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=dev@lankhorst.se \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=shuicheng.lin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.