From: Guchun Chen Date: Wed, 26 Apr 2023 03:05:49 +0000 (+0800) Subject: drm/amdgpu: fix a build warning by a typo in amdgpu_gfx.c X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7a4685cdfbdb94f1cf5ea2ddde824d94bf414708;p=linux.git drm/amdgpu: fix a build warning by a typo in amdgpu_gfx.c This should be a typo when intruducing multi-xx support. Reported-by: kernel test robot Signed-off-by: Guchun Chen Cc: Le Ma Reviewed-by: Le Ma Acked-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index 60bb4bba19947..2cf1f88fde488 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -470,8 +470,8 @@ void amdgpu_gfx_mqd_sw_fini(struct amdgpu_device *adev, int xcc_id) for (i = 0; i < adev->gfx.num_compute_rings; i++) { j = i + xcc_id * adev->gfx.num_compute_rings; - ring = &adev->gfx.compute_ring[i]; - kfree(adev->gfx.mec.mqd_backup[i]); + ring = &adev->gfx.compute_ring[j]; + kfree(adev->gfx.mec.mqd_backup[j]); amdgpu_bo_free_kernel(&ring->mqd_obj, &ring->mqd_gpu_addr, &ring->mqd_ptr);