All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: 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, 20 Aug 2024 11:52:23 -0700	[thread overview]
Message-ID: <87a5h781so.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20240820090230.3258128-1-himal.prasad.ghimiray@intel.com>

On Tue, 20 Aug 2024 02:02:28 -0700, 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.

OK, there's another reference taken in xe_sync_entry_parse() but that is
typically dropped via xe_sync_entry_cleanup().

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

>
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@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;
>  }
> --
> 2.34.1
>

  parent reply	other threads:[~2024-08-20 18:58 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 [this message]
2024-08-27  8:29 ` Nirmoy Das

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=87a5h781so.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@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 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.