drm/amd/display: change several dcn201 variables storage-class-specifier to static
Subsystems (3)
PATCH 1/1 drm/amd/display: change several dcn201 variables storage-class-specifier to static
smatch reports these similar problems in dcn201 drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c:165:22:
warning: symbol 'dcn201_funcs' was not declared. Should it be static?drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_resource.c:77:30:
warning: symbol 'dcn201_ip' was not declared. Should it be static?drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_resource.c:139:37:
warning: symbol 'dcn201_soc' was not declared. Should it be static?drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_mpc.c:79:24:
warning: symbol 'dcn201_mpc_funcs' was not declared. Should it be static?
All of these are only used in their definition file, so they should be static
--- .../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/amd/display/dc/dcn201/dcn201_resource.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c +1 -1
@@ -162,7 +162,7 @@ static void dcn201_update_clocks(struct clk_mgr *clk_mgr_base, } } -struct clk_mgr_funcs dcn201_funcs = { +static struct clk_mgr_funcs dcn201_funcs = { .get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz, .update_clocks = dcn201_update_clocks, .init_clocks = dcn201_init_clocks,
drivers/gpu/drm/amd/display/dc/dcn201/dcn201_mpc.c +1 -1
@@ -76,7 +76,7 @@ static void mpc201_init_mpcc(struct mpcc *mpcc, int mpcc_inst) mpcc->shared_bottom = false; } -const struct mpc_funcs dcn201_mpc_funcs = { +static const struct mpc_funcs dcn201_mpc_funcs = { .read_mpcc_state = mpc1_read_mpcc_state, .insert_plane = mpc1_insert_plane, .remove_mpcc = mpc1_remove_mpcc,
drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c +2 -2
@@ -74,7 +74,7 @@#define MIN_DISP_CLK_KHZ 100000#define MIN_DPP_CLK_KHZ 100000 -struct _vcs_dpi_ip_params_st dcn201_ip = { +static struct _vcs_dpi_ip_params_st dcn201_ip = { .gpuvm_enable =0 , .hostvm_enable =0 , .gpuvm_max_page_table_levels =4 ,
@@ -136,7 +136,7 @@ struct _vcs_dpi_ip_params_st dcn201_ip = { .number_of_cursors = 1, }; -struct _vcs_dpi_soc_bounding_box_st dcn201_soc = { +static struct _vcs_dpi_soc_bounding_box_st dcn201_soc = { .clock_limits = { { .state =0 ,
Signature · 1 line
2.27.0
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 71 lines · Tom Rix
smatch reports these similar problems in dcn201
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c:165:22:
warning: symbol 'dcn201_funcs' was not declared. Should it be static?drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_resource.c:77:30:
warning: symbol 'dcn201_ip' was not declared. Should it be static?drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_resource.c:139:37:
warning: symbol 'dcn201_soc' was not declared. Should it be static?drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_mpc.c:79:24:
warning: symbol 'dcn201_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 <[email protected]>--- .../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/amd/display/dc/dcn201/dcn201_resource.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c +1
-1@@ -162,7 +162,7 @@ static void dcn201_update_clocks(struct clk_mgr *clk_mgr_base, } } -struct clk_mgr_funcs dcn201_funcs = { +static struct clk_mgr_funcs dcn201_funcs = { .get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz, .update_clocks = dcn201_update_clocks, .init_clocks = dcn201_init_clocks,drivers/gpu/drm/amd/display/dc/dcn201/dcn201_mpc.c +1
-1@@ -76,7 +76,7 @@ static void mpc201_init_mpcc(struct mpcc *mpcc, int mpcc_inst) mpcc->shared_bottom = false; } -const struct mpc_funcs dcn201_mpc_funcs = { +static const struct mpc_funcs dcn201_mpc_funcs = { .read_mpcc_state = mpc1_read_mpcc_state, .insert_plane = mpc1_insert_plane, .remove_mpcc = mpc1_remove_mpcc,drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c +2
-3@@ -74,7 +74,7 @@#define MIN_DISP_CLK_KHZ 100000#define MIN_DPP_CLK_KHZ 100000 -struct _vcs_dpi_ip_params_st dcn201_ip = { +static struct _vcs_dpi_ip_params_st dcn201_ip = { .gpuvm_enable =0 , .hostvm_enable =0 , .gpuvm_max_page_table_levels =4 ,@@ -136,7 +136,7 @@ struct _vcs_dpi_ip_params_st dcn201_ip = { .number_of_cursors = 1, }; -struct _vcs_dpi_soc_bounding_box_st dcn201_soc = { +static struct _vcs_dpi_soc_bounding_box_st dcn201_soc = { .clock_limits = { { .state =0 , --2.27.0