drm/amd/powerplay: Remove unneeded variable
Subsystems (2)
cover drm/amd/powerplay: Remove unneeded variable
zhengbin (5):
drm/amd/powerplay: Remove unneeded variable 'result' in smu10_hwmgr.c drm/amd/powerplay: Remove unneeded variable 'result' in vega10_hwmgr.c drm/amd/powerplay: Remove unneeded variable 'ret' in smu7_hwmgr.c drm/amd/powerplay: Remove unneeded variable 'result' in vega12_hwmgr.c drm/amd/powerplay: Remove unneeded variable 'ret' in amdgpu_smu.c
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8 +++----- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 +--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 +--- 5 files changed, 7 insertions(+), 15 deletions(-)
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1574847222-51515-1-git-send-email-zhengbin13-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
PATCH 1/5 drm/amd/powerplay: Remove unneeded variable 'result' in smu10_hwmgr.c
Fixes coccicheck warning:
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c:1154:5-11: Unneeded variable: "result". Return "0" on line 1159
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c +1 -2
@@ -1151,12 +1151,11 @@ static int smu10_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr,struct smu10_hwmgr *data = hwmgr->backend;struct dm_pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges = clock_ranges;Watermarks_t *table = &(data->water_marks_table); -int result =0 ;smu_set_watermarks_for_clocks_ranges (table,wm_with_clock_ranges);smum_smc_table_manager (hwmgr, (uint8_t *)table, (uint16_t )SMU10_WMTABLE , false); data->water_marks_exist = true; -return result; +return 0 ; }static int smu10_smus_notify_pwe (struct pp_hwmgr *hwmgr)
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/5 drm/amd/powerplay: Remove unneeded variable 'result' in vega10_hwmgr.c
In reply to a message not in the archiveFixes coccicheck warning:
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c:4363:5-11: Unneeded variable: "result". Return "0" on line 4370
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +1 -2
@@ -4360,14 +4360,13 @@ static int vega10_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr,struct vega10_hwmgr *data = hwmgr->backend;struct dm_pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges = clock_range;Watermarks_t *table = &(data->smc_state_table.water_marks_table); -int result =0 ;if (!data->registry_data.disable_water_mark) {smu_set_watermarks_for_clocks_ranges (table, wm_with_clock_ranges); data->water_marks_bitmap = WaterMarksExist; } -return result; +return 0 ; }static int vega10_get_ppfeature_status (struct pp_hwmgr *hwmgr,char *buf)
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/5 drm/amd/powerplay: Remove unneeded variable 'ret' in smu7_hwmgr.c
In reply to a message not in the archiveFixes coccicheck warning:
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:5188:5-8: Unneeded variable: "ret". Return "0" on line 5196
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -3
@@ -5185,13 +5185,11 @@ uint8_t smu7_get_sleep_divider_id_from_clock(uint32_t clock,int smu7_init_function_pointers (struct pp_hwmgr *hwmgr) { -int ret =0 ; - hwmgr->hwmgr_func = &smu7_hwmgr_funcs;if (hwmgr->pp_table_version ==PP_TABLE_V0 ) hwmgr->pptable_func = &pptable_funcs;else if (hwmgr->pp_table_version ==PP_TABLE_V1 ) hwmgr->pptable_func = &pptable_v1_0_funcs; -return ret; +return 0 ; }
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/5 drm/amd/powerplay: Remove unneeded variable 'result' in vega12_hwmgr.c
In reply to a message not in the archiveFixes coccicheck warning:
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c:502:5-11: Unneeded variable: "result". Return "0" on line 515
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +1 -3
@@ -499,8 +499,6 @@ static int vega12_get_number_of_dpm_level(struct pp_hwmgr *hwmgr,static int vega12_get_dpm_frequency_by_index (struct pp_hwmgr *hwmgr,PPCLK_e clkID,uint32_t index,uint32_t *clock) { -int result =0 ; -/* *SMU expects the Clock ID to be in the top 16 bits. *Lower 16 bits specify the level
@@ -512,7 +510,7 @@ static int vega12_get_dpm_frequency_by_index(struct pp_hwmgr *hwmgr, *clock =smum_get_argument (hwmgr); -return result; +return 0 ; } static int vega12_setup_single_dpm_table(struct pp_hwmgr *hwmgr,
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/5 drm/amd/powerplay: Remove unneeded variable 'ret' in amdgpu_smu.c
In reply to a message not in the archiveFixes 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
--- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +3 -5
@@ -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 *memory_pool = &smu_table->memory_pool; -int ret =0 ;if (memory_pool->size ==SMU_MEMORY_POOL_SIZE_ZERO ) -return ret; +return 0 ; amdgpu_bo_free_kernel(&memory_pool->bo, &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 )); -return ret; +return 0 ; }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,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 ];void *table = watermarks->cpu_addr;
@@ -1958,7 +1956,7 @@ int smu_set_watermarks_for_clock_ranges(struct smu_context *smu,mutex_unlock (&smu->mutex); -return ret; +return 0 ; }const struct amd_ip_funcs smu_ip_funcs = {
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
AppliedApplied the series. Thanks!
Alex
Quoted 15 lines · zhengbin
zhengbin (5):
drm/amd/powerplay: Remove unneeded variable 'result' insmu10_hwmgr.cdrm/amd/powerplay: Remove unneeded variable 'result' invega10_hwmgr.cdrm/amd/powerplay: Remove unneeded variable 'ret' insmu7_hwmgr.cdrm/amd/powerplay: Remove unneeded variable 'result' invega12_hwmgr.cdrm/amd/powerplay: Remove unneeded variable 'ret' inamdgpu_smu.cdrivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8 +++----- drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 +--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 +--- 5 files changed, 7 insertions(+), 15 deletions(-)
Quoted 7 lines
--
2.7.4_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx