From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/xe: Remove extra dma_fence_put on xe_sync_entry_add_deps failure
Date: Tue, 27 Aug 2024 10:29:34 +0200 [thread overview]
Message-ID: <cd605cab-1d0d-4575-b9b8-81eec6a1f76d@linux.intel.com> (raw)
In-Reply-To: <20240820090230.3258128-1-himal.prasad.ghimiray@intel.com>
On 8/20/2024 11:02 AM, Himal Prasad Ghimiray wrote:
> drm_sched_job_add_dependency() drops references even in case of error,
> no need for caller to call dma_fence_put.
>
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Acked-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
> drivers/gpu/drm/xe/xe_sync.c | 13 +++----------
> 1 file changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
> index ca826aeb41ea..a0675f57a398 100644
> --- a/drivers/gpu/drm/xe/xe_sync.c
> +++ b/drivers/gpu/drm/xe/xe_sync.c
> @@ -206,16 +206,9 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
>
> int xe_sync_entry_add_deps(struct xe_sync_entry *sync, struct xe_sched_job *job)
> {
> - int err;
> -
> - if (sync->fence) {
> - err = drm_sched_job_add_dependency(&job->drm,
> - dma_fence_get(sync->fence));
> - if (err) {
> - dma_fence_put(sync->fence);
> - return err;
> - }
> - }
> + if (sync->fence)
> + return drm_sched_job_add_dependency(&job->drm,
> + dma_fence_get(sync->fence));
>
> return 0;
> }
prev parent reply other threads:[~2024-08-27 8:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 9:02 [PATCH 1/3] drm/xe: Remove extra dma_fence_put on xe_sync_entry_add_deps failure Himal Prasad Ghimiray
2024-08-20 8:55 ` ✓ CI.Patch_applied: success for series starting with [1/3] " Patchwork
2024-08-20 8:56 ` ✓ CI.checkpatch: " Patchwork
2024-08-20 8:57 ` ✓ CI.KUnit: " Patchwork
2024-08-20 9:02 ` [PATCH 2/3] drm/xe: Remove unrequired NULL checks in xe_sync_entry_cleanup Himal Prasad Ghimiray
2024-08-20 16:05 ` Matthew Brost
2024-08-27 8:28 ` Nirmoy Das
2024-08-20 9:02 ` [PATCH 3/3] drm/xe: Remove unrequired NULL check in xe_sched_job_free_fences Himal Prasad Ghimiray
2024-08-20 16:05 ` Matthew Brost
2024-08-20 17:06 ` Randhawa, Jagmeet
2024-08-27 8:29 ` Nirmoy Das
2024-08-20 9:09 ` ✓ CI.Build: success for series starting with [1/3] drm/xe: Remove extra dma_fence_put on xe_sync_entry_add_deps failure Patchwork
2024-08-20 9:11 ` ✓ CI.Hooks: " Patchwork
2024-08-20 9:13 ` ✓ CI.checksparse: " Patchwork
2024-08-20 9:33 ` ✓ CI.BAT: " Patchwork
2024-08-20 14:16 ` ✓ CI.FULL: " Patchwork
2024-08-27 8:43 ` Nirmoy Das
2024-08-20 16:02 ` [PATCH 1/3] " Matthew Brost
2024-08-20 18:52 ` Dixit, Ashutosh
2024-08-27 8:29 ` Nirmoy Das [this message]
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=cd605cab-1d0d-4575-b9b8-81eec6a1f76d@linux.intel.com \
--to=nirmoy.das@linux.intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox