drm/amdgpu: remove unused variable num_xcc

Message ID 20230522123013.1065975-1-trix@redhat.com
State New
Headers
Series drm/amdgpu: remove unused variable num_xcc |

Commit Message

Tom Rix May 22, 2023, 12:30 p.m. UTC
  gcc with W=1 reports
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:2138:13: error: variable
  ‘num_xcc’ set but not used [-Werror=unused-but-set-variable]
 2138 |         int num_xcc;
      |             ^~~~~~~

This variable is not used so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 3 ---
 1 file changed, 3 deletions(-)
  

Comments

Alex Deucher May 22, 2023, 3:10 p.m. UTC | #1
Applied.  Thanks!

Alex

On Mon, May 22, 2023 at 8:30 AM Tom Rix <trix@redhat.com> wrote:
>
> gcc with W=1 reports
> drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:2138:13: error: variable
>   ‘num_xcc’ set but not used [-Werror=unused-but-set-variable]
>  2138 |         int num_xcc;
>       |             ^~~~~~~
>
> This variable is not used so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> index e5cfb3adb3b3..63718cf02aa1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> @@ -2135,9 +2135,6 @@ static void gfx_v9_4_3_ring_emit_gds_switch(struct amdgpu_ring *ring,
>  static int gfx_v9_4_3_early_init(void *handle)
>  {
>         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> -       int num_xcc;
> -
> -       num_xcc = NUM_XCC(adev->gfx.xcc_mask);
>
>         adev->gfx.num_compute_rings = min(amdgpu_gfx_get_num_kcq(adev),
>                                           AMDGPU_MAX_COMPUTE_RINGS);
> --
> 2.27.0
>
  

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
index e5cfb3adb3b3..63718cf02aa1 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
@@ -2135,9 +2135,6 @@  static void gfx_v9_4_3_ring_emit_gds_switch(struct amdgpu_ring *ring,
 static int gfx_v9_4_3_early_init(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-	int num_xcc;
-
-	num_xcc = NUM_XCC(adev->gfx.xcc_mask);
 
 	adev->gfx.num_compute_rings = min(amdgpu_gfx_get_num_kcq(adev),
 					  AMDGPU_MAX_COMPUTE_RINGS);