drm/amdgpu: fix warning
Subsystems (2)
Alex Deucher
maintainerPATCH 1/3 drm/amdgpu: fix warning
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
--- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +1 -1
@@ -949,7 +949,7 @@ static void amdgpu_xgmi_query_ras_error_count(struct amdgpu_device *adev,/* Trigger XGMI/WAFL error */ static int amdgpu_ras_error_inject_xgmi (struct amdgpu_device *adev,void *inject_if) { -int ret =0 ;; +int ret =0 ;struct ta_ras_trigger_error_input *block_info = (struct ta_ras_trigger_error_input *)inject_if;if (amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW ))
Signature · 1 line
2.33.1
Alex Deucher
maintainerPATCH 2/3 drm/amdgpu: add a forward declaration for struct amdgpu_iv_entry
To prevent:
warning: ‘struct amdgpu_iv_entry’ declared inside parameter list will not be visible outside of this definition or declaration
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +2 -0
@@ -29,6 +29,8 @@#include "ta_ras_if.h" #include "amdgpu_ras_eeprom.h" +struct amdgpu_iv_entry ; +#define AMDGPU_RAS_FLAG_INIT_BY_VBIOS (0x1 << 0)enum amdgpu_ras_block {
Signature · 1 line
2.33.1
Alex Deucher
maintainerPATCH 3/3 drm/amdgpu: remove unused variable
In reply to Alex DeucherNo longer used. remove it.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -1
@@ -942,7 +942,6 @@ int amdgpu_ras_query_error_status(struct amdgpu_device *adev,struct amdgpu_ras_block_object * block_obj =NULL ;struct ras_manager *obj =amdgpu_ras_find_obj (adev, &info->head);struct ras_err_data err_data = {0 ,0 ,0 ,NULL }; -int i;if (!obj)return -EINVAL ;
Signature · 1 line
2.33.1
[AMD Official Use Only]
Thanks! The series is:
Quoted 38 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, January 11, 2022 4:19 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH 1/3] drm/amdgpu: fix warningwarning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after- statement]
Fixes 8c50db2f64ee ("drm/amdgpu: Adjust error inject function code style in
amdgpu_ras.c")Cc yipechai <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +1
-1@@ -949,7 +949,7 @@ static void amdgpu_xgmi_query_ras_error_count(structamdgpu_device *adev,/* Trigger XGMI/WAFL error */ static int amdgpu_ras_error_inject_xgmi(struct amdgpu_device *adev, void *inject_if) { - int ret = 0;; + int ret = 0;struct ta_ras_trigger_error_input *block_info = (struct ta_ras_trigger_error_input *)inject_if;if (
amdgpu_dpm_set_df_cstate(adev, DF_CSTATE_DISALLOW))
--
2.33.1
Quoted 15 lines · Alex Deucher
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
Fixes 8c50db2f64ee ("drm/amdgpu: Adjust error inject function code style in amdgpu_ras.c")Cc yipechai <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c static void amdgpu_xgmi_query_ras_error_count(struct amdgpu_device *adev, · line 955
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +1
-1@@ -949,7 +949,7 @@ static void amdgpu_xgmi_query_ras_error_count(struct amdgpu_device *adev,/* Trigger XGMI/WAFL error */ static int amdgpu_ras_error_inject_xgmi (struct amdgpu_device *adev,void *inject_if) { -int ret =0 ;; +int ret =0 ;struct ta_ras_trigger_error_input *block_info = (struct ta_ras_trigger_error_input *)inject_if;if (amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW ))
Hi Alex,
This entire series is:
Thanks.