mirror of https://gitee.com/openkylin/linux.git
drm/amd/powerplay: Remove unneeded variable 'ret' in amdgpu_smu.c
Fixes coccicheck warning: drivers/gpu/drm/amd/powerplay/amdgpu_smu.c:1192:5-8: Unneeded variable: "ret". Return "0" on line 1195 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c:1945:5-8: Unneeded variable: "ret". Return "0" on line 1961 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
3d218c3184
commit
c7d5dfa88b
|
@ -1189,10 +1189,9 @@ static int smu_free_memory_pool(struct smu_context *smu)
|
||||||
{
|
{
|
||||||
struct smu_table_context *smu_table = &smu->smu_table;
|
struct smu_table_context *smu_table = &smu->smu_table;
|
||||||
struct smu_table *memory_pool = &smu_table->memory_pool;
|
struct smu_table *memory_pool = &smu_table->memory_pool;
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (memory_pool->size == SMU_MEMORY_POOL_SIZE_ZERO)
|
if (memory_pool->size == SMU_MEMORY_POOL_SIZE_ZERO)
|
||||||
return ret;
|
return 0;
|
||||||
|
|
||||||
amdgpu_bo_free_kernel(&memory_pool->bo,
|
amdgpu_bo_free_kernel(&memory_pool->bo,
|
||||||
&memory_pool->mc_address,
|
&memory_pool->mc_address,
|
||||||
|
@ -1200,7 +1199,7 @@ static int smu_free_memory_pool(struct smu_context *smu)
|
||||||
|
|
||||||
memset(memory_pool, 0, sizeof(struct smu_table));
|
memset(memory_pool, 0, sizeof(struct smu_table));
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int smu_start_smc_engine(struct smu_context *smu)
|
static int smu_start_smc_engine(struct smu_context *smu)
|
||||||
|
@ -1942,7 +1941,6 @@ int smu_write_watermarks_table(struct smu_context *smu)
|
||||||
int smu_set_watermarks_for_clock_ranges(struct smu_context *smu,
|
int smu_set_watermarks_for_clock_ranges(struct smu_context *smu,
|
||||||
struct dm_pp_wm_sets_with_clock_ranges_soc15 *clock_ranges)
|
struct dm_pp_wm_sets_with_clock_ranges_soc15 *clock_ranges)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
struct smu_table *watermarks = &smu->smu_table.tables[SMU_TABLE_WATERMARKS];
|
struct smu_table *watermarks = &smu->smu_table.tables[SMU_TABLE_WATERMARKS];
|
||||||
void *table = watermarks->cpu_addr;
|
void *table = watermarks->cpu_addr;
|
||||||
|
|
||||||
|
@ -1958,7 +1956,7 @@ int smu_set_watermarks_for_clock_ranges(struct smu_context *smu,
|
||||||
|
|
||||||
mutex_unlock(&smu->mutex);
|
mutex_unlock(&smu->mutex);
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct amd_ip_funcs smu_ip_funcs = {
|
const struct amd_ip_funcs smu_ip_funcs = {
|
||||||
|
|
Loading…
Reference in New Issue