提交 1b9557fc 编写于 作者: B Bhawanpreet Lakha 提交者: Alex Deucher

drm/amd/powerplay: Fix maybe-uninitialized in get_ppfeature_status

This fixes the warning below

error: ‘feature_mask’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  *features_enabled = ((((uint64_t)feature_mask[0] << SMU_FEATURES_LOW_SHIFT) & SMU_FEATURES_LOW_MASK) |
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    (((uint64_t)feature_mask[1] << SMU_FEATURES_HIGH_SHIFT) & SMU_FEATURES_HIGH_MASK));
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 e70a26b3
......@@ -2377,7 +2377,7 @@ static int vega20_odn_edit_dpm_table(struct smu_context *smu,
static int vega20_get_enabled_smc_features(struct smu_context *smu,
uint64_t *features_enabled)
{
uint32_t feature_mask[2];
uint32_t feature_mask[2] = {0, 0};
int ret = 0;
ret = smu_feature_get_enabled_mask(smu, feature_mask, 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册