Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/xe: Remove unrequired NULL checks in xe_sync_entry_cleanup
Date: Tue, 20 Aug 2024 16:05:20 +0000	[thread overview]
Message-ID: <ZsS+wFvsoNhtFkXO@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240820090230.3258128-2-himal.prasad.ghimiray@intel.com>

On Tue, Aug 20, 2024 at 02:32:29PM +0530, Himal Prasad Ghimiray wrote:
> dma_fence_put() and dma_fence_chain_free() can handle NULL input,
> there is no need for NULL check by caller.
> 
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_sync.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
> index a0675f57a398..436faff09bac 100644
> --- a/drivers/gpu/drm/xe/xe_sync.c
> +++ b/drivers/gpu/drm/xe/xe_sync.c
> @@ -249,10 +249,8 @@ void xe_sync_entry_cleanup(struct xe_sync_entry *sync)
>  {
>  	if (sync->syncobj)
>  		drm_syncobj_put(sync->syncobj);
> -	if (sync->fence)
> -		dma_fence_put(sync->fence);
> -	if (sync->chain_fence)
> -		dma_fence_chain_free(sync->chain_fence);
> +	dma_fence_put(sync->fence);
> +	dma_fence_chain_free(sync->chain_fence);
>  	if (sync->ufence)
>  		user_fence_put(sync->ufence);
>  }
> -- 
> 2.34.1
> 

  reply	other threads:[~2024-08-20 16:06 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 [this message]
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

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=ZsS+wFvsoNhtFkXO@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@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