[PATCH 25/40] drm/amd/pm/powerplay/hwmgr/pp_psm: Remove unused variable 'result'

From: Lee Jones
Date: Thu Nov 26 2020 - 08:43:38 EST


Fixes the following W=1 kernel build warning(s):

drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/pp_psm.c: In function ‘psm_init_power_state_table’:
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/pp_psm.c:31:6: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]

Cc: Evan Quan <evan.quan@xxxxxxx>
Cc: Alex Deucher <alexander.deucher@xxxxxxx>
Cc: "Christian König" <christian.koenig@xxxxxxx>
Cc: David Airlie <airlied@xxxxxxxx>
Cc: Daniel Vetter <daniel@xxxxxxxx>
Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
index 31a32a79cfc20..328e87f6c9bcd 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
@@ -28,7 +28,6 @@

int psm_init_power_state_table(struct pp_hwmgr *hwmgr)
{
- int result;
unsigned int i;
unsigned int table_entries;
struct pp_power_state *state;
@@ -73,7 +72,7 @@ int psm_init_power_state_table(struct pp_hwmgr *hwmgr)
state = hwmgr->ps;

for (i = 0; i < table_entries; i++) {
- result = hwmgr->hwmgr_func->get_pp_table_entry(hwmgr, i, state);
+ hwmgr->hwmgr_func->get_pp_table_entry(hwmgr, i, state);

if (state->classification.flags & PP_StateClassificationFlag_Boot) {
hwmgr->boot_ps = state;
--
2.25.1