drm/amdgpu/powerplay/smu7: fix static checker warning

Casting of voltage values to a larger size results in
overwriting adjacent memory in the structure.

Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Deucher 2016-10-14 11:11:06 -04:00
Родитель 26beaee9bb
Коммит 77f7f71f5b
1 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -2127,15 +2127,18 @@ static int smu7_patch_acp_vddc(struct pp_hwmgr *hwmgr,
} }
static int smu7_patch_limits_vddc(struct pp_hwmgr *hwmgr, static int smu7_patch_limits_vddc(struct pp_hwmgr *hwmgr,
struct phm_clock_and_voltage_limits *tab) struct phm_clock_and_voltage_limits *tab)
{ {
uint32_t vddc, vddci;
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
if (tab) { if (tab) {
smu7_patch_ppt_v0_with_vdd_leakage(hwmgr, (uint32_t *)&tab->vddc, smu7_patch_ppt_v0_with_vdd_leakage(hwmgr, &vddc,
&data->vddc_leakage); &data->vddc_leakage);
smu7_patch_ppt_v0_with_vdd_leakage(hwmgr, (uint32_t *)&tab->vddci, tab->vddc = vddc;
&data->vddci_leakage); smu7_patch_ppt_v0_with_vdd_leakage(hwmgr, &vddci,
&data->vddci_leakage);
tab->vddci = vddci;
} }
return 0; return 0;