drm/amdgpu: remove ip dump reg_count variable
authorSunil Khatri <sunil.khatri@amd.com>
Thu, 2 May 2024 08:48:08 +0000 (14:18 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 3 May 2024 13:06:47 +0000 (09:06 -0400)
reg_count is not used and the register count is
directly derived from the array size and hence
removed.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

index 64f197b..9a946f0 100644 (file)
@@ -436,7 +436,6 @@ struct amdgpu_gfx {
 
        /* IP reg dump */
        uint32_t                        *ip_dump;
-       uint32_t                        reg_count;
 };
 
 struct amdgpu_gfx_ras_reg_entry {
index 536287d..3171ed5 100644 (file)
@@ -4592,10 +4592,8 @@ static void gfx_v10_0_alloc_dump_mem(struct amdgpu_device *adev)
        if (ptr == NULL) {
                DRM_ERROR("Failed to allocate memory for IP Dump\n");
                adev->gfx.ip_dump = NULL;
-               adev->gfx.reg_count = 0;
        } else {
                adev->gfx.ip_dump = ptr;
-               adev->gfx.reg_count = reg_count;
        }
 }