drm/amdgpu: remove unused variable warning
Subsystems (2)
PATCH 1/1 drm/amdgpu: remove unused variable warning
--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 23 ----------------------- drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 6 ------ 2 files changed, 29 deletions(-)
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0 -23
@@ -61,22 +61,9 @@ static void umc_v6_7_ecc_info_query_correctable_error_count(struct amdgpu_deviceuint32_t channel_index, unsigned long *error_count) { - uint32_t ecc_err_cnt; uint64_t mc_umc_status;struct amdgpu_ras *ras =amdgpu_ras_get_context (adev); -/* -* select the lower chip and check the error count -* skip add error count, calc error counter only from mca_umc_status -*/ - ecc_err_cnt = ras->umc_ecc.ecc[channel_index].ce_count_lo_chip; - -/* -* select the higher chip and check the err counter -* skip add error count, calc error counter only from mca_umc_status -*/ - ecc_err_cnt = ras->umc_ecc.ecc[channel_index].ce_count_hi_chip; -/* check for SRAM correctable error MCUMC_STATUS is a 64 bit register */ mc_umc_status = ras->umc_ecc.ecc[channel_index].mca_umc_status;
@@ -110,15 +97,11 @@ static void umc_v6_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,uint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;uint32_t channel_index =0 ;/*TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC registers. Will add the protection */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst); channel_index =get_umc_v6_7_channel_index (adev, umc_inst, ch_inst);
@@ -133,7 +116,6 @@ static void umc_v6_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,static void umc_v6_7_ecc_info_query_error_address (struct amdgpu_device *adev,struct ras_err_data *err_data, -uint32_t umc_reg_offset,uint32_t ch_inst,uint32_t umc_inst) {
@@ -192,18 +174,13 @@ static void umc_v6_7_ecc_info_query_ras_error_address(struct amdgpu_device *adevuint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;/*TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC resgisters. Will add the protection * when firmware interface is ready */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst);umc_v6_7_ecc_info_query_error_address (adev, err_data, - umc_reg_offset, ch_inst, umc_inst); }
drivers/gpu/drm/amd/amdgpu/umc_v8_7.c +0 -6
@@ -114,7 +114,6 @@ static void umc_v8_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,static void umc_v8_7_ecc_info_query_error_address (struct amdgpu_device *adev,struct ras_err_data *err_data, -uint32_t umc_reg_offset,uint32_t ch_inst,uint32_t umc_inst) {
@@ -173,19 +172,14 @@ static void umc_v8_7_ecc_info_query_ras_error_address(struct amdgpu_device *adevuint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;/* TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC resgisters. Will add the protection * when firmware interface is ready */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v8_7_reg_offset (adev, - umc_inst, - ch_inst);umc_v8_7_ecc_info_query_error_address (adev, err_data, - umc_reg_offset, ch_inst, umc_inst); }
Signature · 1 line
2.17.1
[AMD Official Use Only]
The change made in drivers/gpu/drm/amd/amdgpu/umc_v8_7.c looks already covered by Zafar's change. Other than that, the patch looks good to me.
Regards,
Hawking
-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Wednesday, January 19, 2022 19:31
To: [email protected]; Zhang, Hawking <[email protected]>; Ziya, Mohammad zafar <[email protected]>; Clements, John <[email protected]>; Zhou1, Tao <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: remove unused variable warning
--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 23 ----------------------- drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 6 ------ 2 files changed, 29 deletions(-)
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0 -23
@@ -61,22 +61,9 @@ static void umc_v6_7_ecc_info_query_correctable_error_count(struct amdgpu_deviceuint32_t channel_index, unsigned long *error_count) { - uint32_t ecc_err_cnt; uint64_t mc_umc_status;struct amdgpu_ras *ras =amdgpu_ras_get_context (adev); -/* -* select the lower chip and check the error count -* skip add error count, calc error counter only from mca_umc_status -*/ - ecc_err_cnt = ras->umc_ecc.ecc[channel_index].ce_count_lo_chip; - -/* -* select the higher chip and check the err counter -* skip add error count, calc error counter only from mca_umc_status -*/ - ecc_err_cnt = ras->umc_ecc.ecc[channel_index].ce_count_hi_chip; -/* check for SRAM correctable error MCUMC_STATUS is a 64 bit register */ mc_umc_status = ras->umc_ecc.ecc[channel_index].mca_umc_status;
@@ -110,15 +97,11 @@ static void umc_v6_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,uint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;uint32_t channel_index =0 ;/*TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC registers. Will add the protection */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst); channel_index =get_umc_v6_7_channel_index (adev, umc_inst, ch_inst);
@@ -133,7 +116,6 @@ static void umc_v6_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,static void umc_v6_7_ecc_info_query_error_address (struct amdgpu_device *adev,struct ras_err_data *err_data, -uint32_t umc_reg_offset,uint32_t ch_inst,uint32_t umc_inst) {
@@ -192,18 +174,13 @@ static void umc_v6_7_ecc_info_query_ras_error_address(struct amdgpu_device *adevuint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;/*TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC resgisters. Will add the protection * when firmware interface is ready */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst);umc_v6_7_ecc_info_query_error_address (adev, err_data, - umc_reg_offset, ch_inst, umc_inst); }
drivers/gpu/drm/amd/amdgpu/umc_v8_7.c +0 -6
@@ -114,7 +114,6 @@ static void umc_v8_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,static void umc_v8_7_ecc_info_query_error_address (struct amdgpu_device *adev,struct ras_err_data *err_data, -uint32_t umc_reg_offset,uint32_t ch_inst,uint32_t umc_inst) {
@@ -173,19 +172,14 @@ static void umc_v8_7_ecc_info_query_ras_error_address(struct amdgpu_device *adevuint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;/* TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC resgisters. Will add the protection * when firmware interface is ready */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v8_7_reg_offset (adev, - umc_inst, - ch_inst);umc_v8_7_ecc_info_query_error_address (adev, err_data, - umc_reg_offset, ch_inst, umc_inst); }
--
2.17.1
[AMD Official Use Only]
Thanks Hawking, the fix in umc_v8_7.c is not included in Zafar's patch.
Regards,
Stanley
Quoted 153 lines
-----邮件原件-----
发件人: Zhang, Hawking <[email protected]>
发送时间: Wednesday, January 19, 2022 8:10 PM
收件人: Yang, Stanley <[email protected]>; amd- [email protected]; Ziya, Mohammad zafar <[email protected]>; Clements, John <[email protected]>; Zhou1, Tao <[email protected]> 抄送: Yang, Stanley <[email protected]>
主题: RE: [PATCH Review 1/1] drm/amdgpu: remove unused variable warning[AMD Official Use Only]
The change made in
drivers/gpu/drm/amd/amdgpu/umc_v8_7.clooks already covered by Zafar's change. Other than that, the patch looks good to me.Reviewed-by Hawking Zhang <[email protected]>Regards,
Hawking
-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Wednesday, January 19, 2022 19:31
To: [email protected]; Zhang, Hawking <[email protected]>; Ziya, Mohammad zafar <[email protected]>; Clements, John <[email protected]>; Zhou1, Tao <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: remove unused variable warningChange-Id Ic2a488ee253a913d806bd33ee9c90e31a71af320Signed-off-by Stanley.Yang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 23 ----------------------- drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 6 ------ 2 files changed, 29 deletions(-)drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-0@@ -61,22 +61,9 @@ static voidumc_v6_7_ecc_info_query_correctable_error_count(struct
amdgpu_devicedrivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-13uint32_t channel_index, unsigned long *error_count) { - uint32_t ecc_err_cnt; uint64_t mc_umc_status;struct amdgpu_ras *ras =amdgpu_ras_get_context (adev); -/* -* select the lower chip and check the error count -* skip add error count, calc error counter only from mca_umc_status -*/ - ecc_err_cnt = ras->umc_ecc.ecc[channel_index].ce_count_lo_chip; - -/* -* select the higher chip and check the err counter -* skip add error count, calc error counter only from mca_umc_status -*/ - ecc_err_cnt = ras->umc_ecc.ecc[channel_index].ce_count_hi_chip; -/* check for SRAM correctable error MCUMC_STATUS is a 64 bit register */ mc_umc_status = ras-Quoted 1 line
umc_ecc.ecc[channel_index].mca_umc_status;
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-4@@ -110,15 +97,11 @@ static void umc_v6_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev, uint32_t umc_inst = 0;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;uint32_t channel_index =0 ;/*TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC registers. Will add the protection */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst); channel_index = get_umc_v6_7_channel_index(adev, umc_inst,drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-1ch_inst);@@ -133,7 +116,6 @@ static void umc_v6_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev, static void umc_v6_7_ecc_info_query_error_address(struct amdgpu_device *adev, struct ras_err_data *err_data, - uint32_t umc_reg_offset, uint32_t ch_inst,drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-0uint32_t umc_inst) {@@ -192,18 +174,13 @@ static voidumc_v6_7_ecc_info_query_ras_error_address(struct
amdgpu_device*adevdrivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0
-5uint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;/*TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC resgisters. Will add the protection * when firmware interface is ready */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst);umc_v6_7_ecc_info_query_error_address (adev, err_data, - umc_reg_offset, ch_inst, umc_inst); }drivers/gpu/drm/amd/amdgpu/umc_v8_7.c +0
-1@@ -114,7 +114,6 @@ static void umc_v8_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev, static void umc_v8_7_ecc_info_query_error_address(struct amdgpu_device *adev, struct ras_err_data *err_data, - uint32_t umc_reg_offset, uint32_t ch_inst,drivers/gpu/drm/amd/amdgpu/umc_v8_7.c +0
-0uint32_t umc_inst) {@@ -173,19 +172,14 @@ static voidumc_v8_7_ecc_info_query_ras_error_address(struct
amdgpu_device*adevdrivers/gpu/drm/amd/amdgpu/umc_v8_7.c +0
-6uint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;/* TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC resgisters. Will add the protection * when firmware interface is ready */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v8_7_reg_offset (adev, - umc_inst, - ch_inst);umc_v8_7_ecc_info_query_error_address (adev, err_data, - umc_reg_offset, ch_inst, umc_inst); } --2.17.1
Deucher, Alexander
maintainer[AMD Official Use Only]
Please include a patch description even if it's similar to the subject.
Alex
________________________________
From: amd-gfx <[email protected]> on behalf of Stanley.Yang <[email protected]>
Sent: Wednesday, January 19, 2022 6:30 AM
To: [email protected] <[email protected]>; Zhang, Hawking <[email protected]>; Ziya, Mohammad zafar <[email protected]>; Clements, John <[email protected]>; Zhou1, Tao <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: remove unused variable warning
--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 23 ----------------------- drivers/gpu/drm/amd/amdgpu/umc_v8_7.c | 6 ------ 2 files changed, 29 deletions(-)
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +0 -23
@@ -61,22 +61,9 @@ static void umc_v6_7_ecc_info_query_correctable_error_count(struct amdgpu_deviceuint32_t channel_index, unsigned long *error_count) { - uint32_t ecc_err_cnt; uint64_t mc_umc_status;struct amdgpu_ras *ras =amdgpu_ras_get_context (adev); -/* -* select the lower chip and check the error count -* skip add error count, calc error counter only from mca_umc_status -*/ - ecc_err_cnt = ras->umc_ecc.ecc[channel_index].ce_count_lo_chip; - -/* -* select the higher chip and check the err counter -* skip add error count, calc error counter only from mca_umc_status -*/ - ecc_err_cnt = ras->umc_ecc.ecc[channel_index].ce_count_hi_chip; -/* check for SRAM correctable error MCUMC_STATUS is a 64 bit register */ mc_umc_status = ras->umc_ecc.ecc[channel_index].mca_umc_status;
@@ -110,15 +97,11 @@ static void umc_v6_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,uint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;uint32_t channel_index =0 ;/*TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC registers. Will add the protection */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst); channel_index =get_umc_v6_7_channel_index (adev, umc_inst, ch_inst);
@@ -133,7 +116,6 @@ static void umc_v6_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,static void umc_v6_7_ecc_info_query_error_address (struct amdgpu_device *adev,struct ras_err_data *err_data, -uint32_t umc_reg_offset,uint32_t ch_inst,uint32_t umc_inst) {
@@ -192,18 +174,13 @@ static void umc_v6_7_ecc_info_query_ras_error_address(struct amdgpu_device *adevuint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;/*TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC resgisters. Will add the protection * when firmware interface is ready */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst);umc_v6_7_ecc_info_query_error_address (adev, err_data, - umc_reg_offset, ch_inst, umc_inst); }
drivers/gpu/drm/amd/amdgpu/umc_v8_7.c +0 -6
@@ -114,7 +114,6 @@ static void umc_v8_7_ecc_info_query_ras_error_count(struct amdgpu_device *adev,static void umc_v8_7_ecc_info_query_error_address (struct amdgpu_device *adev,struct ras_err_data *err_data, -uint32_t umc_reg_offset,uint32_t ch_inst,uint32_t umc_inst) {
@@ -173,19 +172,14 @@ static void umc_v8_7_ecc_info_query_ras_error_address(struct amdgpu_device *adevuint32_t umc_inst =0 ;uint32_t ch_inst =0 ; -uint32_t umc_reg_offset =0 ;/* TODO: driver needs to toggle DF Cstate to ensure * safe access of UMC resgisters. Will add the protection * when firmware interface is ready */ LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v8_7_reg_offset (adev, - umc_inst, - ch_inst);umc_v8_7_ecc_info_query_error_address (adev, err_data, - umc_reg_offset, ch_inst, umc_inst); }
--
2.17.1