[PATCH -next] drm/amdgpu/si_dma: remove unused variable in si_dma_stop()

Alex Deucher alexdeucher at gmail.com
Wed Oct 12 13:38:25 UTC 2022


Applied.  Thanks!

Alex

On Wed, Oct 12, 2022 at 3:37 AM Yang Yingliang <yangyingliang at huawei.com> wrote:
>
> After commit 571c05365892 ("drm/amdgpu: switch sdma buffer function
> tear down to a helper"), the variable 'ring' is not used anymore, it
> can be removed.
>
> Signed-off-by: Yang Yingliang <yangyingliang at huawei.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/si_dma.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c
> index 4d5e718540aa..abca8b529721 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_dma.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c
> @@ -112,14 +112,12 @@ static void si_dma_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq,
>
>  static void si_dma_stop(struct amdgpu_device *adev)
>  {
> -       struct amdgpu_ring *ring;
>         u32 rb_cntl;
>         unsigned i;
>
>         amdgpu_sdma_unset_buffer_funcs_helper(adev);
>
>         for (i = 0; i < adev->sdma.num_instances; i++) {
> -               ring = &adev->sdma.instance[i].ring;
>                 /* dma0 */
>                 rb_cntl = RREG32(DMA_RB_CNTL + sdma_offsets[i]);
>                 rb_cntl &= ~DMA_RB_ENABLE;
> --
> 2.25.1
>


More information about the dri-devel mailing list