[PATCH 15/21] drm/amdgpu: simplify the access to eeprom_control struct
Zhou1, Tao
Tao.Zhou1 at amd.com
Thu Sep 19 07:13:02 UTC 2019
simplify the code of accessing to eeprom_control struct
Signed-off-by: Tao Zhou <tao.zhou1 at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index f72c9f011ffa..61d02e5cfc14 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1345,7 +1345,7 @@ static int amdgpu_ras_save_bad_pages(struct amdgpu_device *adev)
save_count = data->count - control->num_recs;
/* only new entries are saved */
if (save_count > 0)
- if (amdgpu_ras_eeprom_process_recods(&con->eeprom_control,
+ if (amdgpu_ras_eeprom_process_recods(control,
&data->bps[control->num_recs],
true,
save_count)) {
@@ -1483,11 +1483,11 @@ int amdgpu_ras_recovery_init(struct amdgpu_device *adev)
atomic_set(&con->in_recovery, 0);
con->adev = adev;
- ret = amdgpu_ras_eeprom_init(&adev->psp.ras.ras->eeprom_control);
+ ret = amdgpu_ras_eeprom_init(&con->eeprom_control);
if (ret)
goto free;
- if (adev->psp.ras.ras->eeprom_control.num_recs) {
+ if (con->eeprom_control.num_recs) {
ret = amdgpu_ras_load_bad_pages(adev);
if (ret)
goto free;
--
2.17.1
More information about the amd-gfx
mailing list