Skip to contentSkip to conversation

drm/amdgpu: remove ip dump reg_count variable

PATCH In review Sunil Khatri 2 participants 2 messages May 2, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: remove ip dump reg_count variable

reg_count is not used and the register count is
directly derived from the array size and hence
removed.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 -
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c  | 2 --
 2 files changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +0 -1
index 64f197bbc866..9a946f0e015c 100644
@@ -436,7 +436,6 @@ struct amdgpu_gfx {
 
 	/* IP reg dump */
 	uint32_t			*ip_dump;
-	uint32_t			reg_count;
 };
 
 struct amdgpu_gfx_ras_reg_entry {
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0 -2
index 536287ddd2ec..3171ed5e5af3 100644
@@ -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;
 	}
 }
 
Signature · 1 line
2.34.1
maintainer Acked-by on v1 1/1
#1 lore raw

Am 02.05.24 um 10:56 schrieb Sunil Khatri:

Quoted 5 lines

reg_count is not used and the register count is
directly derived from the array size and hence
removed.

Quoted 32 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 -
  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c  | 2 --
  2 files changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +0 -1
index 64f197bbc866..9a946f0e015c 100644
@@ -436,7 +436,6 @@ struct amdgpu_gfx {
 
  	/* IP reg dump */
  	uint32_t			*ip_dump;
-	uint32_t			reg_count;
  };
 
  struct amdgpu_gfx_ras_reg_entry {
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +0 -2
index 536287ddd2ec..3171ed5e5af3 100644
@@ -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;
  	}
  }