mirror of https://gitee.com/openkylin/linux.git
drm/amd/powerplay: remove set but not used variable 'vbios_version', 'data'
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 commit599a7e9fe1
("drm/amd/powerplay: implement smu7 hwmgr to manager asics with smu ip version 7."), but never used, so remove it. 'data' is introduced by commitf688b614b6
("drm/amd/pp: Implement get_performance_level for legacy dgpu"), but never used, so remove it. Reviewed-by: Evan Quan <evan.quan@amd.com> Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4b31b17207
commit
cb7709223b
|
@ -4225,7 +4225,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
|
||||
|
@ -4234,7 +4233,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;
|
||||
|
||||
|
@ -5064,13 +5062,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 ?
|
||||
|
|
Loading…
Reference in New Issue