Commit e31ae352 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/pm: fix compile warnings about variable used uninitialized

Fix the compile warnings below:
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:13: warning: variable 'min' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
>> drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:1743:13: warning: variable 'max' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 660b3bd8
...@@ -1866,7 +1866,7 @@ static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr) ...@@ -1866,7 +1866,7 @@ static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr)
{ {
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
struct amdgpu_device *adev = hwmgr->adev; struct amdgpu_device *adev = hwmgr->adev;
uint32_t asicrev1, evv_revision, max, min; uint32_t asicrev1, evv_revision, max = 0, min = 0;
atomctrl_read_efuse(hwmgr, STRAP_EVV_REVISION_LSB, STRAP_EVV_REVISION_MSB, atomctrl_read_efuse(hwmgr, STRAP_EVV_REVISION_LSB, STRAP_EVV_REVISION_MSB,
&evv_revision); &evv_revision);
...@@ -1903,8 +1903,7 @@ static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr) ...@@ -1903,8 +1903,7 @@ static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr)
max = 2500; max = 2500;
} }
} }
} else if ((hwmgr->chip_id == CHIP_POLARIS11) || } else {
(hwmgr->chip_id == CHIP_POLARIS12)) {
min = 1100; min = 1100;
max = 2100; max = 2100;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment