Re: [PATCH -next] drm/amdgpu: Remove a lot of unnecessary ternary operators

2023-08-01 Thread Tom Rix
On 7/31/23 6:26 AM, Ruan Jinjie wrote: Ther are many ternary operators, the true or false judgement of which is unnecessary in C language semantics. Signed-off-by: Ruan Jinjie --- snip data->registry_data.avfs_support = - hwmgr->feature_mask & PP_AVFS_MASK ? true :

[PATCH] drm/radeon: remove unused variable rbo

2023-05-25 Thread Tom Rix
gcc with W=1 reports drivers/gpu/drm/radeon/radeon_ttm.c:200:27: error: variable ‘rbo’ set but not used [-Werror=unused-but-set-variable] 200 | struct radeon_bo *rbo; | ^~~ This variable is not used so remove it. Signed-off-by: Tom Rix --- drivers/gpu

[PATCH] drm/amdgpu: move gfx9_cs_data definition

2023-05-25 Thread Tom Rix
[] = { |^~~~ gfx9_cs_data is only used in gfx_v9_0.c, so move its definition there. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/amdgpu/clearstate_gfx9.h | 4 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c| 5 + 2 files changed, 5 insertions(+), 4 deletions

[PATCH] drm/amdkfd: remove unused function get_reserved_sdma_queues_bitmap

2023-05-25 Thread Tom Rix
) ^ This function is not used so remove it. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index

[PATCH] drm/amd/display: remove unused variables res_create_maximus_funcs and debug_defaults_diags

2023-05-23 Thread Tom Rix
= { | ^~~~ These variables are not used so remove them. Signed-off-by: Tom Rix --- .../drm/amd/display/dc/dcn20/dcn20_resource.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu

[PATCH] drm/amdgpu: remove unused variable num_xcc

2023-05-22 Thread Tom Rix
gcc with W=1 reports drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c:2138:13: error: variable ‘num_xcc’ set but not used [-Werror=unused-but-set-variable] 2138 | int num_xcc; | ^~~ This variable is not used so remove it. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd

[PATCH] drm/amdgpu: remove unused variable mmhub_v1_8_mmea_cgtt_clk_cntl_reg

2023-05-22 Thread Tom Rix
[] = { | ^ This variable is not used so remove it. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c index 3648994724c2..00e7e5db7c28 100644

[PATCH] drm/amd/display: set variable custom_backlight_curve0 storage-class-specifier to static

2023-04-26 Thread Tom Rix
smatch reports drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.c:119:31: warning: symbol 'custom_backlight_curve0' was not declared. Should it be static? This variable is only used in its defining file, so it should be static Signed-off-by: Tom Rix --- drivers/gpu/drm/amd

Re: [PATCH] drm/amd/display: return status of dmub_srv_get_fw_boot_status

2023-04-24 Thread Tom Rix
On 4/24/23 10:02 AM, Hamza Mahfooz wrote: On 4/20/23 09:59, Tom Rix wrote: gcc with W=1 reports drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:    In function ‘dc_dmub_srv_optimized_init_done’: drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:184:26:    error: variable ‘dmub

[PATCH] drm/amd/display: remove unused variables dispclk_delay_subtotal and dout

2023-04-20 Thread Tom Rix
is not used, so remove it. Which made dout unused, so also remove. Signed-off-by: Tom Rix --- .../display/dc/dml/dcn314/display_rq_dlg_calc_314.c| 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c b/drivers/gpu/drm/amd

[PATCH] drm/amd/display: return status of dmub_srv_get_fw_boot_status

2023-04-20 Thread Tom Rix
*dmub; | ^~~~ The return status is never set. It looks like a call to dmub_srv_get_fw_boot_status is missing. Fixes: 499e4b1c722e ("drm/amd/display: add mechanism to skip DCN init") Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/dc_dmub_

[PATCH] drm/amdgpu: remove unused variable j

2023-04-20 Thread Tom Rix
’: drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c:529:19: error: variable ‘j’ set but not used [-Werror=unused-but-set-variable] 529 | int r, i, j; | ^ These variables are not used, so remove them. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

[PATCH] drm/amd/display: return status of abm_feature_support

2023-04-20 Thread Tom Rix
feature_support; | ^~~ This variable is not used so remove it. The status of amb_feature_support should have been returned, so set ret and return it. Fixes: b8fe56375f78 ("drm/amd/display: Refactor ABM feature") Signed-off-by: Tom Rix --- drivers/g

[PATCH] drm/amd/display: remove unused variables otg_inst and cmd

2023-04-19 Thread Tom Rix
e them. Fixes: e97cc04fe0fb ("drm/amd/display: refactor dmub commands into single function") Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c b/dri

[PATCH] drm/amd/display: set variable dccg314_init storage-class-specifier to static

2023-04-17 Thread Tom Rix
smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dcn314/dcn314_dccg.c:277:6: warning: symbol 'dccg314_init' was not declared. Should it be static? This variable is only used in one file so should be static. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/dcn314

[PATCH] drm/amd/display: remove unused variable oldest_index

2023-04-14 Thread Tom Rix
cpp_check reports drivers/gpu/drm/amd/display/modules/freesync/freesync.c:1143:17: style: Variable 'oldest_index' is assigned a value that is never used. [unreadVariable] oldest_index = 0; ^ This variable is not used so remove. Signed-off-by: Tom Rix --- drivers/gpu/drm

[PATCH] drm/amd/pm: change pmfw_decoded_link_width, speed variables to globals

2023-04-14 Thread Tom Rix
, 2, 3, 4, 5}; | ^~~ These variables are defined and used in smu_v13_0_7_ppt.c and smu_v13_0_0_ppt.c. There should be only one definition. So define the variables as globals in smu_v13_0.c Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/pm/swsmu/inc

[PATCH] drm/amd/display: set variables dml*_funcs storage-class-specifier to static

2023-04-10 Thread Tom Rix
/amdgpu/../display/dc/dml/display_mode_lib.c:86:24: warning: symbol 'dml32_funcs' was not declared. Should it be static? These variables are only used in one file so should be static. Cleanup whitespace, use tabs consistently for indents. Signed-off-by: Tom Rix --- .../drm/amd/display/dc/dml

[PATCH] drm/amd/display: set variables aperture_default_system and context0_default_system storage-class-specifier to static

2023-04-08 Thread Tom Rix
. Should it be static? These variables are only used in one file so should be static. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c b/drivers

[PATCH] drm/amd/display: set variable dcn3_14_soc storage-class-specifier to static

2023-04-08 Thread Tom Rix
smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn314/dcn314_fpu.c:100:37: warning: symbol 'dcn3_14_soc' was not declared. Should it be static? This variable is only used in one file so should be static. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/dml/dcn314

[PATCH] drm/amd/pm: remove unused num_of_active_display variable

2023-03-31 Thread Tom Rix
clang with W=1 reports drivers/gpu/drm/amd/amdgpu/../pm/swsmu/amdgpu_smu.c:1700:6: error: variable 'num_of_active_display' set but not used [-Werror,-Wunused-but-set-variable] int num_of_active_display = 0; ^ This variable is not used so remove it. Signed-off-by: Tom Rix

[PATCH] drm/amd/display: remove unused average_render_time_in_us and i variables

2023-03-31 Thread Tom Rix
is not used so remove it, which caused i to be unused so remove that as well. Signed-off-by: Tom Rix --- .../drm/amd/display/modules/freesync/freesync.c| 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd

[PATCH] drm/amd/display: remove unused average_render_time_in_us and i variables

2023-03-31 Thread Tom Rix
is not used so remove it, which caused i to be unused so remove that as well. Signed-off-by: Tom Rix --- .../drm/amd/display/modules/freesync/freesync.c| 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd

[PATCH] drm/amdkfd: remove unused sq_int_priv variable

2023-03-30 Thread Tom Rix
is not used so remove it. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c b/drivers/gpu/drm/amd/amdkfd/kfd_int_process_v11.c index 0d53f6067422

[PATCH] drm/amd/display: remove unused matching_stream_ptrs variable

2023-03-27 Thread Tom Rix
-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_enc_cfg.c index 41198c729d90..30c0644d4418 100644

[PATCH] drm/radeon: remove unused variable rbo

2023-03-14 Thread Tom Rix
event moving of pinned BOs") Since the variable is not used, remove it. Signed-off-by: Tom Rix --- drivers/gpu/drm/radeon/radeon_ttm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 2220cdf6a3f6..0ea430ee5

[PATCH] drm/amd/display: remove unused variable available

2023-03-08 Thread Tom Rix
, remove it. Signed-off-by: Tom Rix --- .../drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c index

[PATCH] drm/amd/display: remove unused variable res_pool

2023-03-08 Thread Tom Rix
res_pool is unused, remove it. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

[PATCH] drm/amd/display: change several dcn30 variables storage-class-specifier to static

2023-03-06 Thread Tom Rix
'dcn30_mmhubbub_funcs' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mpc.c:1402:24: warning: symbol 'dcn30_mpc_funcs' was not declared. Should it be static? All of these are only used in their definition file, so they should be static Signed-off-by: Tom Rix

[PATCH] drm/amd/display: change several dcn20 variables storage-class-specifier to static

2023-03-06 Thread Tom Rix
' was not declared. Should it be static? All of these are only used in their definition file, so they should be static Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dsc.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn20

[PATCH] drm/amd/display: change several dcn201 variables storage-class-specifier to static

2023-03-06 Thread Tom Rix
' was not declared. Should it be static? All of these are only used in their definition file, so they should be static Signed-off-by: Tom Rix --- .../gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c| 2 +- drivers/gpu/drm/amd/display/dc/dcn201/dcn201_mpc.c| 2 +- drivers/gpu/drm

[PATCH] drm/amd/pm: set vangogh_set_apu_thermal_limit storage-class-specifier to static

2023-03-01 Thread Tom Rix
) | ^ vangogh_set_apu_thermal_limit is only used in vangogh_ppt.c, so it should be static Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b

[PATCH] drm/amdgpu: remove unused variable ring

2023-02-24 Thread Tom Rix
building with gcc and W=1 reports drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c:81:29: error: variable ‘ring’ set but not used [-Werror=unused-but-set-variable] 81 | struct amdgpu_ring *ring; | ^~~~ ring is not used so remove it. Signed-off-by: Tom Rix

[PATCH] drm/amdgpu: remove unused variable channel_index

2023-02-24 Thread Tom Rix
is not used so remove it. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/amdgpu/umc_v8_10.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v8_10.c b/drivers/gpu/drm/amd/amdgpu/umc_v8_10.c index 66158219f791..3f051dec56e9 100644

[PATCH] drm/amd/display: set should_disable_otg storage-class-specifier to static

2023-02-09 Thread Tom Rix
smatch reports drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c:90:6: warning: symbol 'should_disable_otg' was not declared. Should it be static? should_disable_otg() is only used in dcn315_clk_mgr.c, so it should be static Signed-off-by: Tom Rix --- drivers/gpu/drm

[PATCH] drm/amd/display: reduce else-if to else in dcn10_blank_pixel_data()

2023-01-26 Thread Tom Rix
: aa5a57773042 ("drm/amd/display: Vari-bright looks disabled near end of MM14") Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

[PATCH] drm/amd/display: reduce else-if to else in dcn32_calculate_dlg_params()

2023-01-26 Thread Tom Rix
check != condition, an else is simplier. Fixes: 238debcaebe4 ("drm/amd/display: Use DML for MALL SS and Subvp allocation calculations") Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[PATCH] drm/amd/display: remove redundant CalculateRemoteSurfaceFlipDelay's

2022-09-19 Thread Tom Rix
There are several copies of CalculateRemoteSurfaceFlipDelay. Reduce to one instance. Signed-off-by: Tom Rix --- .../dc/dml/dcn20/display_mode_vba_20.c| 4 +- .../dc/dml/dcn20/display_mode_vba_20v2.c | 40 +-- .../dc/dml/dcn21/display_mode_vba_21.c| 40

Re: [PATCH 1/2] drm/amd/display: Reduce number of arguments of dml314's CalculateWatermarksAndDRAMSpeedChangeSupport()

2022-09-19 Thread Tom Rix
On 9/16/22 2:06 PM, Nathan Chancellor wrote: Most of the arguments are identical between the two call sites and they can be accessed through the 'struct vba_vars_st' pointer. This reduces the total amount of stack space that dml314_ModeSupportAndSystemConfigurationFull() uses by 240 bytes with

[PATCH] drm/amd/display: remove redundant CalculateTWait's

2022-09-19 Thread Tom Rix
There are several copies of CalculateTwait. Reduce to one instance and change local variable name to match common usage. Signed-off-by: Tom Rix --- .../dc/dml/dcn20/display_mode_vba_20.c| 16 +++--- .../dc/dml/dcn20/display_mode_vba_20v2.c | 21 ++- .../dc

[PATCH] drm/amd/display: refactor CalculateWriteBackDelay to use vba_vars_st ptr

2022-09-19 Thread Tom Rix
Mimimize the function signature by passing a pointer and an index instead of passing several elements of the pointer. The dml2x,dml3x families uses the same algorithm. Remove the duplicates. Use dml20_ and dml30_ prefix to distinguish the two variants. Signed-off-by: Tom Rix --- .../dc/dml

[PATCH] drm/amd/display: change to_dal_irq_source_dnc32() storage class specifier to static

2022-06-27 Thread Tom Rix
. Fixes: 0efd4374f6b4 ("drm/amd/display: add dcn32 IRQ changes") Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn32/irq_service_dcn32.c b/drive

[PATCH] drm/amd/display: Remove unused globals FORCE_RATE and FORCE_LANE_COUNT

2022-06-27 Thread Tom Rix
? Neither of thse variables is used in dc_link_dp.c. Reviewing the commit listed in the fixes tag shows neither was used in the original patch. So remove them. Fixes: 265280b99822 ("drm/amd/display: add CLKMGR changes for DCN32/321") Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/displ

[PATCH] drm/radeon: change cac_weights_* to static

2022-04-25 Thread Tom Rix
should be static, so change their storage-class specifiers to static. Signed-off-by: Tom Rix --- drivers/gpu/drm/radeon/si_dpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 3add39c1a689..fbf968e3f6d7

[PATCH] drm/radeon: change cik_default_state table from global to static

2022-04-25 Thread Tom Rix
. Single file symbols should be static. So move their definitions to cik_blit_shaders.h and change their storage-class-specifier to static. Remove unneeded cik_blit_shader.c Signed-off-by: Tom Rix --- drivers/gpu/drm/radeon/Makefile | 2 +- drivers/gpu/drm/radeon/cik_blit_shaders.c

[PATCH] drm/amd/display: add virtual_setup_stream_attribute decl to header

2022-04-19 Thread Tom Rix
elsewhere. For consistency, add the virtual_setup_stream_attribute decl to virtual_link_hwss.h. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.h b/drivers

[PATCH] drm/radeon/kms: change evergreen_default_state table from global to static

2022-04-19 Thread Tom Rix
were removed with commit 4f8629675800 ("drm/radeon/kms: remove r6xx+ blit copy routines") So their declarations in evergreen_blit_shader.h are not needed, so remove them. Signed-off-by: Tom Rix --- drivers/gpu/drm/radeon/Makefile | 2 +- .../gpu/drm/radeon/evergreen_blit

[PATCH] drm/radeon: remove r600_blit_shaders.[c|h]

2022-04-11 Thread Tom Rix
The only use of the global variables in r600_blit_shaders.c were in the old drivers/gpu/drm/radeon/r600_blit.c This file was removed in commit 8333f607a631 ("drm/radeon: remove UMS support") So remove the r600_blit_shaders.[c|h] files Signed-off-by: Tom Rix --- drivers/gpu/drm/radeo

[PATCH] drm/radeon: change cayman_default_state table from global to static

2022-04-07 Thread Tom Rix
4f8629675800 ("drm/radeon/kms: remove r6xx+ blit copy routines") So their declarations in cayman_blit_shader.h are not needed, so remove them. Signed-off-by: Tom Rix --- drivers/gpu/drm/radeon/Makefile | 2 +- drivers/gpu/drm/radeon/cayman_blit_shade

[PATCH v2] drm/radeon: change si_default_state table from global to static

2022-04-05 Thread Tom Rix
be static. So move the definition of si_default_state and si_default_size to si_blit_shader.h and change their storage-class-specifier to static. Remove unneeded si_blit_shader.c Signed-off-by: Tom Rix --- v2: move definitions to header drivers/gpu/drm/radeon/Makefile | 2 +- drivers

Re: [PATCH] drm/amd/display: cleanup extern usage in function definition

2022-04-04 Thread Tom Rix
On 4/4/22 8:22 AM, Harry Wentland wrote: On 2022-04-03 10:21, Tom Rix wrote: Smatch reports this issue hdcp1_execution.c:500:29: warning: function 'mod_hdcp_hdcp1_dp_execution' with external linkage has definition Which branch are you using? linux-next from 4/1 Tom I don't see

Re: [PATCH] drm/radeon: change si_default_state table from global to static

2022-04-04 Thread Tom Rix
On 4/4/22 6:32 AM, Christian König wrote: Am 04.04.22 um 15:01 schrieb Tom Rix: On 4/4/22 5:34 AM, Christian König wrote: Am 04.04.22 um 14:32 schrieb Tom Rix: On 4/3/22 8:23 AM, Christian König wrote: Am 02.04.22 um 18:27 schrieb Tom Rix: Smatch reports these issues si_blit_shaders.c:31

Re: [PATCH] drm/radeon: change si_default_state table from global to static

2022-04-04 Thread Tom Rix
On 4/3/22 8:23 AM, Christian König wrote: Am 02.04.22 um 18:27 schrieb Tom Rix: Smatch reports these issues si_blit_shaders.c:31:11: warning: symbol 'si_default_state'    was not declared. Should it be static? si_blit_shaders.c:253:11: warning: symbol 'si_default_size'    was not declared

Re: [PATCH] drm/radeon: change si_default_state table from global to static

2022-04-04 Thread Tom Rix
On 4/4/22 5:34 AM, Christian König wrote: Am 04.04.22 um 14:32 schrieb Tom Rix: On 4/3/22 8:23 AM, Christian König wrote: Am 02.04.22 um 18:27 schrieb Tom Rix: Smatch reports these issues si_blit_shaders.c:31:11: warning: symbol 'si_default_state'    was not declared. Should it be static

[PATCH] drm/amd/display: cleanup extern usage in function definition

2022-04-04 Thread Tom Rix
Smatch reports this issue hdcp1_execution.c:500:29: warning: function 'mod_hdcp_hdcp1_dp_execution' with external linkage has definition The storage-class-specifier extern is not needed in a definition, so remove it. Signed-off-by: Tom Rix --- drivers/gpu/drm/amd/display/modules/hdcp

[PATCH] drm/radeon: change si_default_state table from global to static

2022-04-04 Thread Tom Rix
be static. So move the si_default_state and si_default_size to si.c and change their storage-class-specifier to static. Remove unneeded si_blit_shaders.[c|h] Signed-off-by: Tom Rix --- drivers/gpu/drm/radeon/Makefile | 2 +- drivers/gpu/drm/radeon/si.c | 224

Re: [PATCH] drm/amdgpu: Fix realloc of ptr

2022-02-28 Thread Tom Rix
On 2/26/22 2:21 PM, David Laight wrote: From: t...@redhat.com Sent: 26 February 2022 15:59 From: Tom Rix Clang static analysis reports this error amdgpu_debugfs.c:1690:9: warning: 1st function call argument is an uninitialized value tmp = krealloc_array(tmp, i + 1

Re: [PATCH] drm/amdgpu: fix printk format for size_t variable

2022-02-21 Thread Tom Rix
On 2/21/22 12:53 PM, Luben Tuikov wrote: On 2022-02-21 15:36, Tom Rix wrote: On 2/21/22 11:57 AM, Luben Tuikov wrote: Hi Tom, This was already fixed with this patch, and LKML was CC-ed. See the CC tags in the patch below, commit 4f7d7cda90cbd7 Author: Luben Tuikov Date: Wed Feb 16 16

Re: [PATCH] drm/amdgpu: fix printk format for size_t variable

2022-02-21 Thread Tom Rix
2-21 12:37, t...@redhat.com wrote: From: Tom Rix On mips64 allyesconfig, there is this build break amdgpu_discovery.c:671:35: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} DRM_DEBUG("match:%d @ ip_offset:%ld", i

Re: [PATCH] drm/amdkfd: rework criu_restore_bos error handling

2022-02-19 Thread Tom Rix
On 2/18/22 10:35 AM, Felix Kuehling wrote: Am 2022-02-18 um 12:39 schrieb t...@redhat.com: From: Tom Rix Clang static analysis reports this problem kfd_chardev.c:2327:2: warning: 1st function call argument    is an uninitialized value    kvfree(bo_privs

Re: [PATCH] amdgpu: avoid incorrect %hu format string

2021-03-22 Thread Tom Rix
This was for a different reason. imo, you do not need to include what another patch did. so you could also just remove this bit from the commit log. The change itself looks good. Reviewed-by: Tom Rix > > Fixes: 0b437e64e0af ("drm/amdgpu: remove h from printk format specifier&quo

Re: [PATCH] drm/amdgpu: remove h from printk format specifier

2020-12-15 Thread Tom Rix
On 12/15/20 6:47 AM, Christian König wrote: > Am 15.12.20 um 15:38 schrieb t...@redhat.com: >> From: Tom Rix >> >> See Documentation/core-api/printk-formats.rst. >> h should no longer be used in the format specifier for printk. > > In general looks valid t

Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-23 Thread Tom Rix
On 11/22/20 10:22 AM, Joe Perches wrote: > On Sun, 2020-11-22 at 08:33 -0800, Tom Rix wrote: >> On 11/21/20 9:10 AM, Joe Perches wrote: >>> On Sat, 2020-11-21 at 08:50 -0800, t...@redhat.com wrote: >>>> A difficult part of automating commits is composing the subsyst

Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-23 Thread Tom Rix
On 11/21/20 7:23 PM, Matthew Wilcox wrote: > On Sat, Nov 21, 2020 at 08:50:58AM -0800, t...@redhat.com wrote: >> The fixer review is >> https://reviews.llvm.org/D91789 >> >> A run over allyesconfig for x86_64 finds 62 issues, 5 are false positives. >> The false positives are caused by macros

Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-23 Thread Tom Rix
On 11/21/20 9:10 AM, Joe Perches wrote: > On Sat, 2020-11-21 at 08:50 -0800, t...@redhat.com wrote: >> A difficult part of automating commits is composing the subsystem >> preamble in the commit log. For the ongoing effort of a fixer producing >> one or two fixes a release the use of 'treewide:'

Re: [RFC] MAINTAINERS tag for cleanup robot

2020-11-23 Thread Tom Rix
On 11/22/20 6:56 AM, Matthew Wilcox wrote: > On Sun, Nov 22, 2020 at 06:46:46AM -0800, Tom Rix wrote: >> On 11/21/20 7:23 PM, Matthew Wilcox wrote: >>> On Sat, Nov 21, 2020 at 08:50:58AM -0800, t...@redhat.com wrote: >>>> The fixer review is >>>> https

Re: Subject: [RFC] clang tooling cleanups

2020-11-10 Thread Tom Rix
On 11/9/20 6:52 PM, Joe Perches wrote: > On Tue, 2020-10-27 at 09:42 -0700, t...@redhat.com wrote: >> This rfc will describe >> An upcoming treewide cleanup. >> How clang tooling was used to programatically do the clean up. >> Solicit opinions on how to generally use clang tooling. >> >> The

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-20 Thread Tom Rix
On 10/19/20 12:42 PM, Nick Desaulniers wrote: > On Sat, Oct 17, 2020 at 10:43 PM Greg KH wrote: >> On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote: >>> From: Tom Rix >>> >>> This is a upcoming change to clean up a new warning treewide. &g

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-20 Thread Tom Rix
On 10/19/20 4:05 PM, Jason Gunthorpe wrote: > On Mon, Oct 19, 2020 at 12:42:15PM -0700, Nick Desaulniers wrote: >> On Sat, Oct 17, 2020 at 10:43 PM Greg KH wrote: >>> On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote: >>>> From: Tom Rix >&

Re: [RFC] treewide: cleanup unreachable breaks

2020-10-19 Thread Tom Rix
On 10/17/20 10:43 PM, Greg KH wrote: > On Sat, Oct 17, 2020 at 09:09:28AM -0700, t...@redhat.com wrote: >> From: Tom Rix >> >> This is a upcoming change to clean up a new warning treewide. >> I am wondering if the change could be one mega patch (see below) or >>