[PATCH] drm/xe: Check return values of functions in xe_gt_shutdown()
Ghimiray, Himal Prasad
himal.prasad.ghimiray at intel.com
Mon Sep 23 05:09:19 UTC 2024
On 20-09-2024 16:23, apoorva.singh at intel.com wrote:
> From: Apoorva Singh <apoorva.singh at 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 at intel.com>
>
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
> Signed-off-by: Apoorva Singh <apoorva.singh at 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));
> }
>
> /**
More information about the Intel-xe
mailing list