diff options
author | Luben Tuikov <luben.tuikov@amd.com> | 2021-03-26 20:13:10 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-07-01 00:24:41 -0400 |
commit | 803c6ebdd32808834556b20548df9a1d079e4f24 (patch) | |
tree | 5dfc041247bb050abf3239a770107a604ae6f8e8 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h | |
parent | dce4400e6516d18313d23de45b5be8a18980b00e (diff) | |
download | linux-803c6ebdd32808834556b20548df9a1d079e4f24.tar.gz linux-803c6ebdd32808834556b20548df9a1d079e4f24.tar.bz2 linux-803c6ebdd32808834556b20548df9a1d079e4f24.zip |
drm/amdgpu: Simplify RAS EEPROM checksum calculations
Rename update_table_header() to
write_table_header() as this function is actually
writing it to EEPROM.
Use kernel types; use u8 to carry around the
checksum, in order to take advantage of arithmetic
modulo 8-bits (256).
Tidy up to 80 columns.
When updating the checksum, just recalculate the
whole thing.
Cc: Alexander Deucher <Alexander.Deucher@amd.com>
Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Acked-by: Alexander Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h index fa9c509a8e2f..4906ed9fb8cd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h @@ -48,7 +48,7 @@ struct amdgpu_ras_eeprom_control { uint32_t next_addr; unsigned int num_recs; struct mutex tbl_mutex; - uint32_t tbl_byte_sum; + u8 tbl_byte_sum; }; /* |