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 b9e3288ae5fab2693604cd2fa96cf9a0518f82d8
Author: Lin Huiyi <[email protected]>

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

This commit initializes all peer mutexes before mapping GART ranges and
calls amdgpu_ualink_peer_remote_fini() on the amdgpu_ualink_sw_init()
failure path so partially created peer GART mappings are unwound.

> 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]
Does replacing the only jump to out_sdma_entities_fini leave that label
unused, triggering a -Wunused-label warning (and a build failure with
WERROR enabled)?

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to