Commit d05f2c7a authored by Muhammad Falak R Wani's avatar Muhammad Falak R Wani Committed by Alex Deucher

drm/amd/amdgpu/cz_dpm: Remove unused variable

Remove unused variable 'ret' from functions where it
was not used anyway, and directly return 0.
Reviewed-by: default avatarJunwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: default avatarMuhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 734711b7
...@@ -1579,7 +1579,6 @@ static int cz_dpm_update_sclk_limit(struct amdgpu_device *adev) ...@@ -1579,7 +1579,6 @@ static int cz_dpm_update_sclk_limit(struct amdgpu_device *adev)
static int cz_dpm_set_deep_sleep_sclk_threshold(struct amdgpu_device *adev) static int cz_dpm_set_deep_sleep_sclk_threshold(struct amdgpu_device *adev)
{ {
int ret = 0;
struct cz_power_info *pi = cz_get_pi(adev); struct cz_power_info *pi = cz_get_pi(adev);
if (pi->caps_sclk_ds) { if (pi->caps_sclk_ds) {
...@@ -1588,20 +1587,19 @@ static int cz_dpm_set_deep_sleep_sclk_threshold(struct amdgpu_device *adev) ...@@ -1588,20 +1587,19 @@ static int cz_dpm_set_deep_sleep_sclk_threshold(struct amdgpu_device *adev)
CZ_MIN_DEEP_SLEEP_SCLK); CZ_MIN_DEEP_SLEEP_SCLK);
} }
return ret; return 0;
} }
/* ?? without dal support, is this still needed in setpowerstate list*/ /* ?? without dal support, is this still needed in setpowerstate list*/
static int cz_dpm_set_watermark_threshold(struct amdgpu_device *adev) static int cz_dpm_set_watermark_threshold(struct amdgpu_device *adev)
{ {
int ret = 0;
struct cz_power_info *pi = cz_get_pi(adev); struct cz_power_info *pi = cz_get_pi(adev);
cz_send_msg_to_smc_with_parameter(adev, cz_send_msg_to_smc_with_parameter(adev,
PPSMC_MSG_SetWatermarkFrequency, PPSMC_MSG_SetWatermarkFrequency,
pi->sclk_dpm.soft_max_clk); pi->sclk_dpm.soft_max_clk);
return ret; return 0;
} }
static int cz_dpm_enable_nbdpm(struct amdgpu_device *adev) static int cz_dpm_enable_nbdpm(struct amdgpu_device *adev)
...@@ -1636,7 +1634,6 @@ static void cz_dpm_nbdpm_lm_pstate_enable(struct amdgpu_device *adev, ...@@ -1636,7 +1634,6 @@ static void cz_dpm_nbdpm_lm_pstate_enable(struct amdgpu_device *adev,
static int cz_dpm_update_low_memory_pstate(struct amdgpu_device *adev) static int cz_dpm_update_low_memory_pstate(struct amdgpu_device *adev)
{ {
int ret = 0;
struct cz_power_info *pi = cz_get_pi(adev); struct cz_power_info *pi = cz_get_pi(adev);
struct cz_ps *ps = &pi->requested_ps; struct cz_ps *ps = &pi->requested_ps;
...@@ -1647,21 +1644,19 @@ static int cz_dpm_update_low_memory_pstate(struct amdgpu_device *adev) ...@@ -1647,21 +1644,19 @@ static int cz_dpm_update_low_memory_pstate(struct amdgpu_device *adev)
cz_dpm_nbdpm_lm_pstate_enable(adev, true); cz_dpm_nbdpm_lm_pstate_enable(adev, true);
} }
return ret; return 0;
} }
/* with dpm enabled */ /* with dpm enabled */
static int cz_dpm_set_power_state(struct amdgpu_device *adev) static int cz_dpm_set_power_state(struct amdgpu_device *adev)
{ {
int ret = 0;
cz_dpm_update_sclk_limit(adev); cz_dpm_update_sclk_limit(adev);
cz_dpm_set_deep_sleep_sclk_threshold(adev); cz_dpm_set_deep_sleep_sclk_threshold(adev);
cz_dpm_set_watermark_threshold(adev); cz_dpm_set_watermark_threshold(adev);
cz_dpm_enable_nbdpm(adev); cz_dpm_enable_nbdpm(adev);
cz_dpm_update_low_memory_pstate(adev); cz_dpm_update_low_memory_pstate(adev);
return ret; return 0;
} }
static void cz_dpm_post_set_power_state(struct amdgpu_device *adev) static void cz_dpm_post_set_power_state(struct amdgpu_device *adev)
......
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