diff mbox series

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

Message ID 20201126134240.3214176-26-lee.jones@linaro.org
State New
Headers show
Series [01/40] drm/amd/pm/powerplay/smumgr/tonga_smumgr: Remove set but unused variable 'res' | expand

Commit Message

Lee Jones Nov. 26, 2020, 1:42 p.m. UTC
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@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

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;