Re: [PATCH] drm/amdgpu: Fix unused variable in amdgpu_gfx.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

On Tue, May 23, 2023 at 3:07 PM Srinivasan Shanmugam
<srinivasan.shanmugam@xxxxxxx> wrote:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c: In function ‘amdgpu_gfx_disable_kcq’:
> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:497:6: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
>   497 |  int j;
>       |      ^
> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c: In function ‘amdgpu_gfx_disable_kgq’:
> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:528:6: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
>   528 |  int j;
>       |      ^
> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c: In function ‘amdgpu_gfx_enable_kgq’:
> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:630:12: warning: variable ‘j’ set but not used [-Wunused-but-set-variable]
>   630 |  int r, i, j;
>       |
>
> Cc: Alex Deucher <alexander.deucher@xxxxxxx>
> Cc: Christian König <christian.koenig@xxxxxxx>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> index 2b4bf6c11ae4..a33d4bc34cee 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> @@ -509,7 +509,7 @@ int amdgpu_gfx_disable_kcq(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;
>                 kiq->pmf->kiq_unmap_queues(kiq_ring,
> -                                          &adev->gfx.compute_ring[i],
> +                                          &adev->gfx.compute_ring[j],
>                                            RESET_QUEUES, 0, 0);
>         }
>
> @@ -541,7 +541,7 @@ int amdgpu_gfx_disable_kgq(struct amdgpu_device *adev, int xcc_id)
>                 for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
>                         j = i + xcc_id * adev->gfx.num_gfx_rings;
>                         kiq->pmf->kiq_unmap_queues(kiq_ring,
> -                                                  &adev->gfx.gfx_ring[i],
> +                                                  &adev->gfx.gfx_ring[j],
>                                                    PREEMPT_QUEUES, 0, 0);
>                 }
>         }
> @@ -648,7 +648,7 @@ int amdgpu_gfx_enable_kgq(struct amdgpu_device *adev, int xcc_id)
>                 for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
>                         j = i + xcc_id * adev->gfx.num_gfx_rings;
>                         kiq->pmf->kiq_map_queues(kiq_ring,
> -                                                &adev->gfx.gfx_ring[i]);
> +                                                &adev->gfx.gfx_ring[j]);
>                 }
>         }
>
> --
> 2.25.1
>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux