From: zhengbin <zhengbi...@huawei.com>

[ Upstream commit cb7709223b39287a020e92ff880d11d377dc53a1 ]

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function 
smu7_check_mc_firmware:
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:4215:11: warning: variable 
vbios_version set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function 
smu7_get_performance_level:
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:5054:21: warning: variable 
data set but not used [-Wunused-but-set-variable]

'vbios_version' is introduced by commit 599a7e9fe1b6 ("drm/amd/powerplay:
implement smu7 hwmgr to manager asics with smu ip version 7."),
but never used, so remove it.

'data' is introduced by commit f688b614b643 ("drm/amd/pp:
Implement get_performance_level for legacy dgpu"), but never used,
so remove it.

Reviewed-by: Evan Quan <evan.q...@amd.com>
Reported-by: Hulk Robot <hul...@huawei.com>
Signed-off-by: zhengbin <zhengbi...@huawei.com>
Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
Signed-off-by: Sasha Levin <sas...@kernel.org>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index 203ce4b1028f8..042800f63ef32 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -4232,7 +4232,6 @@ static int smu7_check_mc_firmware(struct pp_hwmgr *hwmgr)
 {
        struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
 
-       uint32_t vbios_version;
        uint32_t tmp;
 
        /* Read MC indirect register offset 0x9F bits [3:0] to see
@@ -4241,7 +4240,6 @@ static int smu7_check_mc_firmware(struct pp_hwmgr *hwmgr)
         */
 
        smu7_get_mc_microcode_version(hwmgr);
-       vbios_version = hwmgr->microcode_version_info.MC & 0xf;
 
        data->need_long_memory_training = false;
 
@@ -5071,13 +5069,11 @@ static int smu7_get_performance_level(struct pp_hwmgr 
*hwmgr, const struct pp_hw
                                PHM_PerformanceLevel *level)
 {
        const struct smu7_power_state *ps;
-       struct smu7_hwmgr *data;
        uint32_t i;
 
        if (level == NULL || hwmgr == NULL || state == NULL)
                return -EINVAL;
 
-       data = hwmgr->backend;
        ps = cast_const_phw_smu7_power_state(state);
 
        i = index > ps->performance_level_count - 1 ?
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to