drm/amdgpu: remove unneeded variable
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 drm/amdgpu: remove unneeded variable
fix the following coccicheck warning:
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c:1156:5-11: Unneeded variable: "result".
Signed-off-by Mingtong Bao <[email protected]>
--- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c +1 -2
@@ -1153,7 +1153,6 @@ int smu7_enable_power_containment(struct pp_hwmgr *hwmgr)struct phm_ppt_v1_information *table_info = (struct phm_ppt_v1_information *)(hwmgr->pptable);int smc_result; -int result =0 ;struct phm_cac_tdp_table *cac_table; data->power_containment_features =0 ;
@@ -1191,7 +1190,7 @@ int smu7_enable_power_containment(struct pp_hwmgr *hwmgr) } } } -return result; +return 0 ; }int smu7_disable_power_containment (struct pp_hwmgr *hwmgr)
Quoted 6 lines · On Wed, Jun 14, 2023 at 3:20 AM <[email protected]> wrote:
fix the following coccicheck warning:
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c:1156:5-11:
Unneeded variable: "result".
This variable is used and the code fails to compile with it removed.
Alex
Quoted 29 lines
Signed-off-by Mingtong Bao <[email protected]>--- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c +0
-1@@ -1153,7 +1153,6 @@ int smu7_enable_power_containment(struct pp_hwmgr *hwmgr)struct phm_ppt_v1_information *table_info = (struct phm_ppt_v1_information *)(hwmgr->pptable);int smc_result; -int result =0 ;struct phm_cac_tdp_table *cac_table;data->power_containment_features = 0;drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_powertune.c +1
-1@@ -1191,7 +1190,7 @@ int smu7_enable_power_containment(struct pp_hwmgr *hwmgr) } } } -return result; +return 0 ; }int
smu7_disable_power_containment(struct pp_hwmgr *hwmgr)