AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] drm/amdgpu: Unwind UALink peer GART mappings on sw_init failure
       [not found] <tencent_68AD21355F7D6938E09033A5356ED3E9AC09@qq.com>
@ 2026-11-30 15:35 ` sashiko-bot
  0 siblings, 0 replies; only message in thread
From: sashiko-bot @ 2026-11-30 15:35 UTC (permalink / raw)
  To: Lin Huiyi; +Cc: amd-gfx, dri-devel

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/amdgpu: unused label out_sdma_entities_fini in
  amdgpu_ualink_sw_init()
--

commit 90ff0905f06f0ca6521bbd25d88d5438f22effc9
Author: Lin Huiyi <xinghui79@qq.com>

drm/amdgpu: Unwind UALink peer GART mappings on sw_init failure

This commit initializes all peer mutexes before mapping peer GART ranges
and calls amdgpu_ualink_peer_remote_fini() on failure in
amdgpu_ualink_sw_init().

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> index fa4c3d27d2720..cf794c0feb3df 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c

[ ... ]

> @@ -6345,11 +6350,13 @@ int amdgpu_ualink_sw_init(struct amdgpu_device *adev)
>  
>  	r = amdgpu_ualink_peer_remote_init(adev);
>  	if (r)
> -		goto out_sdma_entities_fini;
> +		goto out_peer_remote_fini;
>  
>  	dev_dbg(adev->dev, "ualink sw init succeed\n");
>  	return 0;
>  
> +out_peer_remote_fini:
> +	amdgpu_ualink_peer_remote_fini(adev);
>  out_sdma_entities_fini:
>  	amdgpu_ualink_sdma_entities_fini(adev);
>  out_npa_unmap:

[Severity: Medium]
Should the out_sdma_entities_fini label be removed now that its only
caller jumps to out_peer_remote_fini?  Leaving it in place triggers a
-Wunused-label compiler warning and breaks builds with -Werror enabled.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_68AD21355F7D6938E09033A5356ED3E9AC09@qq.com?part=1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30 15:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <tencent_68AD21355F7D6938E09033A5356ED3E9AC09@qq.com>
2026-11-30 15:35 ` [PATCH] drm/amdgpu: Unwind UALink peer GART mappings on sw_init failure sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox