Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ghimiray, Himal Prasad" <himal.prasad.ghimiray@intel.com>
To: <apoorva.singh@intel.com>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: Check return values of functions in xe_gt_shutdown()
Date: Mon, 23 Sep 2024 10:39:19 +0530	[thread overview]
Message-ID: <6bda76e6-571a-4d3c-a46d-e8099c4e3e5a@intel.com> (raw)
In-Reply-To: <20240920105342.1798882-1-apoorva.singh@intel.com>



On 20-09-2024 16:23, apoorva.singh@intel.com wrote:
> From: Apoorva Singh <apoorva.singh@intel.com>
> 
> Put check on the return value of functions xe_force_wake_get()
> and xe_force_wake_put() to avoid mistakenly considering error
> values as normal values.

Will it be possible to rephrase. Something like,

Check the return values of the functions xe_force_wake_get() and 
xe_force_wake_put() to prevent mistakenly treating them as void returns.

I had addressed this in 
https://lore.kernel.org/intel-xe/20240917122126.438448-7-himal.prasad.ghimiray@intel.com/, 
the series might take more time for conclusion.
In the meanwhile lets go ahead with this patch to silent the static 
analyzer.

With above addressed:
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>

> 
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
> Signed-off-by: Apoorva Singh <apoorva.singh@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_gt.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
> index 274737417b0f..eaeaae1df198 100644
> --- a/drivers/gpu/drm/xe/xe_gt.c
> +++ b/drivers/gpu/drm/xe/xe_gt.c
> @@ -890,9 +890,9 @@ int xe_gt_suspend(struct xe_gt *gt)
>   
>   void xe_gt_shutdown(struct xe_gt *gt)
>   {
> -	xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
> +	XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL));
>   	do_gt_reset(gt);
> -	xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL);
> +	XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
>   }
>   
>   /**


  parent reply	other threads:[~2024-09-23  5:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20 10:53 [PATCH] drm/xe: Check return values of functions in xe_gt_shutdown() apoorva.singh
2024-09-20 11:07 ` ✓ CI.Patch_applied: success for " Patchwork
2024-09-20 11:07 ` ✓ CI.checkpatch: " Patchwork
2024-09-20 11:08 ` ✓ CI.KUnit: " Patchwork
2024-09-20 11:20 ` ✓ CI.Build: " Patchwork
2024-09-20 11:24 ` ✓ CI.Hooks: " Patchwork
2024-09-20 11:26 ` ✓ CI.checksparse: " Patchwork
2024-09-20 11:47 ` ✓ CI.BAT: " Patchwork
2024-09-20 15:30 ` ✓ CI.FULL: " Patchwork
2024-09-23  5:09 ` Ghimiray, Himal Prasad [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-23 11:06 [PATCH] " apoorva.singh
2024-09-23 11:57 ` Jani Nikula
2024-09-26  6:48   ` Ghimiray, Himal Prasad
2024-09-26 11:00 apoorva.singh
2024-09-26 11:11 ` Maarten Lankhorst
2024-09-26 11:19   ` Ghimiray, Himal Prasad
2024-09-30  7:21     ` Ghimiray, Himal Prasad
2024-09-30 21:26 ` Matt Roper

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=6bda76e6-571a-4d3c-a46d-e8099c4e3e5a@intel.com \
    --to=himal.prasad.ghimiray@intel.com \
    --cc=apoorva.singh@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