Re: [PATCH -next] drm/amd/display: Make some symbols static
Applied. Thanks! Alex On Wed, Oct 19, 2022 at 3:48 AM ruanjinjie wrote: > > These symbols qp_table_422_10bpc_min, qp_table_444_8bpc_max, > qp_table_420_12bpc_max, qp_table_444_10bpc_min, qp_table_420_8bpc_max, > qp_table_444_8bpc_min, qp_table_444_12bpc_min, qp_table_420_12bpc_min, > qp_table_422_12bpc_min, qp_table_422_12bpc_max, qp_table_444_12bpc_max, > qp_table_420_8bpc_min, qp_table_422_8bpc_min, qp_table_422_10bpc_max, > qp_table_420_10bpc_max, qp_table_420_10bpc_min, qp_table_444_10bpc_max, > qp_table_422_8bpc_max are not used outside of the file, > so mark them static. > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:28:18: warning: > symbol 'qp_table_422_10bpc_min' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:61:18: warning: > symbol 'qp_table_444_8bpc_max' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:102:18: > warning: > symbol 'qp_table_420_12bpc_max' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:135:18: > warning: > symbol 'qp_table_444_10bpc_min' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:188:18: > warning: > symbol 'qp_table_420_8bpc_max' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:209:18: > warning: > symbol 'qp_table_444_8bpc_min' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:250:18: > warning: > symbol 'qp_table_444_12bpc_min' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:315:18: > warning: > symbol 'qp_table_420_12bpc_min' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:348:18: > warning: > symbol 'qp_table_422_12bpc_min' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:389:18: > warning: > symbol 'qp_table_422_12bpc_max' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:430:18: > warning: > symbol 'qp_table_444_12bpc_max' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:495:18: > warning: > symbol 'qp_table_420_8bpc_min' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:516:18: > warning: > symbol 'qp_table_422_8bpc_min' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:541:18: > warning: > symbol 'qp_table_422_10bpc_max' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:574:16: > warning: > symbol 'qp_table_420_10bpc_max' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:601:18: > warning: > symbol 'qp_table_420_10bpc_min' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:628:18: > warning: > symbol 'qp_table_444_10bpc_max' was not declared. Should it be static? > > ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:681:18: > warning: > symbol 'qp_table_422_8bpc_max' was not declared. Should it be static? > > Signed-off-by: ruanjinjie > --- > .../drm/amd/display/dc/dml/dsc/qp_tables.h| 36 +-- > 1 file changed, 18 insertions(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dml/dsc/qp_tables.h > b/drivers/gpu/drm/amd/display/dc/dml/dsc/qp_tables.h > index e5fac9f4181d..dcff0dd2b6a1 100644 > --- a/drivers/gpu/drm/amd/display/dc/dml/dsc/qp_tables.h > +++ b/drivers/gpu/drm/amd/display/dc/dml/dsc/qp_tables.h > @@ -25,7 +25,7 @@ > */ > > > -const qp_table qp_table_422_10bpc_min = { > +static const qp_table qp_table_422_10bpc_min = { > { 6, { 0, 4, 5, 6, 6, 6, 6, 7, 7, 8, 9, 9, 9, 12, 16} }, > { 6.5, { 0, 4, 5, 6, 6, 6, 6, 7, 7, 8, 9, 9, 9, 12, 16} }, > { 7, { 0, 4, 5, 6, 6, 6, 6, 7, 7, 7, 9, 9, 9, 11, 15} }, > @@ -58,7 +58,7 @@ const qp_table qp_table_422_10bpc_min = { > }; > > > -const qp_table qp_table_444_8bpc_max = { > +static const qp_table qp_table_444_8bpc_max = { > { 6, { 4, 6, 8, 8, 9, 9, 9, 10, 11, 12, 12, 12, 12, 13, 15} }, > { 6.5, { 4, 6, 7, 8, 8, 8, 9, 10, 11, 11, 12, 12, 12, 13, 15} }, > { 7, { 4, 5, 7, 7, 8, 8, 8, 9, 10, 11, 11, 12, 12, 13, 14} }, > @@ -99,7 +99,7 @@ const qp_table qp_table_444_8bpc_max = { > }; > > > -const qp_table qp_table_420_12bpc_max = { > +static const qp_table qp_table_420_12bpc_max = { > { 4, {11, 12, 13, 14, 15, 15, 15, 16, 17, 18, 18, 19, 19, 21, 22} }, > { 4.5, {10, 11, 12, 13, 14, 15, 15, 16, 17, 18, 18, 19, 19, 20, 21} }, > { 5, { 9,
[PATCH -next] drm/amd/display: Make some symbols static
These symbols qp_table_422_10bpc_min, qp_table_444_8bpc_max, qp_table_420_12bpc_max, qp_table_444_10bpc_min, qp_table_420_8bpc_max, qp_table_444_8bpc_min, qp_table_444_12bpc_min, qp_table_420_12bpc_min, qp_table_422_12bpc_min, qp_table_422_12bpc_max, qp_table_444_12bpc_max, qp_table_420_8bpc_min, qp_table_422_8bpc_min, qp_table_422_10bpc_max, qp_table_420_10bpc_max, qp_table_420_10bpc_min, qp_table_444_10bpc_max, qp_table_422_8bpc_max are not used outside of the file, so mark them static. ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:28:18: warning: symbol 'qp_table_422_10bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:61:18: warning: symbol 'qp_table_444_8bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:102:18: warning: symbol 'qp_table_420_12bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:135:18: warning: symbol 'qp_table_444_10bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:188:18: warning: symbol 'qp_table_420_8bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:209:18: warning: symbol 'qp_table_444_8bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:250:18: warning: symbol 'qp_table_444_12bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:315:18: warning: symbol 'qp_table_420_12bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:348:18: warning: symbol 'qp_table_422_12bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:389:18: warning: symbol 'qp_table_422_12bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:430:18: warning: symbol 'qp_table_444_12bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:495:18: warning: symbol 'qp_table_420_8bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:516:18: warning: symbol 'qp_table_422_8bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:541:18: warning: symbol 'qp_table_422_10bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:574:16: warning: symbol 'qp_table_420_10bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:601:18: warning: symbol 'qp_table_420_10bpc_min' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:628:18: warning: symbol 'qp_table_444_10bpc_max' was not declared. Should it be static? ./drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/qp_tables.h:681:18: warning: symbol 'qp_table_422_8bpc_max' was not declared. Should it be static? Signed-off-by: ruanjinjie --- .../drm/amd/display/dc/dml/dsc/qp_tables.h| 36 +-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dsc/qp_tables.h b/drivers/gpu/drm/amd/display/dc/dml/dsc/qp_tables.h index e5fac9f4181d..dcff0dd2b6a1 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dsc/qp_tables.h +++ b/drivers/gpu/drm/amd/display/dc/dml/dsc/qp_tables.h @@ -25,7 +25,7 @@ */ -const qp_table qp_table_422_10bpc_min = { +static const qp_table qp_table_422_10bpc_min = { { 6, { 0, 4, 5, 6, 6, 6, 6, 7, 7, 8, 9, 9, 9, 12, 16} }, { 6.5, { 0, 4, 5, 6, 6, 6, 6, 7, 7, 8, 9, 9, 9, 12, 16} }, { 7, { 0, 4, 5, 6, 6, 6, 6, 7, 7, 7, 9, 9, 9, 11, 15} }, @@ -58,7 +58,7 @@ const qp_table qp_table_422_10bpc_min = { }; -const qp_table qp_table_444_8bpc_max = { +static const qp_table qp_table_444_8bpc_max = { { 6, { 4, 6, 8, 8, 9, 9, 9, 10, 11, 12, 12, 12, 12, 13, 15} }, { 6.5, { 4, 6, 7, 8, 8, 8, 9, 10, 11, 11, 12, 12, 12, 13, 15} }, { 7, { 4, 5, 7, 7, 8, 8, 8, 9, 10, 11, 11, 12, 12, 13, 14} }, @@ -99,7 +99,7 @@ const qp_table qp_table_444_8bpc_max = { }; -const qp_table qp_table_420_12bpc_max = { +static const qp_table qp_table_420_12bpc_max = { { 4, {11, 12, 13, 14, 15, 15, 15, 16, 17, 18, 18, 19, 19, 21, 22} }, { 4.5, {10, 11, 12, 13, 14, 15, 15, 16, 17, 18, 18, 19, 19, 20, 21} }, { 5, { 9, 11, 12, 13, 14, 15, 15, 16, 17, 17, 18, 18, 19, 20, 21} }, @@ -132,7 +132,7 @@ const qp_table qp_table_420_12bpc_max = { }; -const qp_table qp_table_444_10bpc_min = { +static const qp_table qp_table_444_10bpc_min = { { 6, { 0, 4, 7, 7, 9, 9, 9, 9, 9, 10, 10, 10, 10, 12, 18}
[PATCH next] drm/amd/display: make some symbols static
Make some structs and functions static to fix build warnings, parts of warnings are as follows: drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_resource.c:744:21: warning: symbol 'dce110_clock_source_create' was not declared. Should it be static? drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_resource.c:768:6: warning: symbol 'dce110_clock_source_destroy' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Chen Zhou --- drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c index bf14e9a..87227db 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c @@ -741,7 +741,7 @@ struct dce_i2c_hw *dce110_i2c_hw_create( return dce_i2c_hw; } -struct clock_source *dce110_clock_source_create( +static struct clock_source *dce110_clock_source_create( struct dc_context *ctx, struct dc_bios *bios, enum clock_source_id id, @@ -765,7 +765,7 @@ struct clock_source *dce110_clock_source_create( return NULL; } -void dce110_clock_source_destroy(struct clock_source **clk_src) +static void dce110_clock_source_destroy(struct clock_source **clk_src) { struct dce110_clk_src *dce110_clk_src; @@ -1007,7 +1007,7 @@ static bool dce110_validate_bandwidth( return result; } -enum dc_status dce110_validate_plane(const struct dc_plane_state *plane_state, +static enum dc_status dce110_validate_plane(const struct dc_plane_state *plane_state, struct dc_caps *caps) { if (((plane_state->dst_rect.width * 2) < plane_state->src_rect.width) || @@ -1062,7 +1062,7 @@ static bool dce110_validate_surface_sets( return true; } -enum dc_status dce110_validate_global( +static enum dc_status dce110_validate_global( struct dc *dc, struct dc_state *context) { @@ -1305,7 +1305,7 @@ static void bw_calcs_data_update_from_pplib(struct dc *dc) 1000); } -const struct resource_caps *dce110_resource_cap( +static const struct resource_caps *dce110_resource_cap( struct hw_asic_id *asic_id) { if (ASIC_REV_IS_STONEY(asic_id->hw_internal_rev)) -- 2.7.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH next] drm/amd/display: make some symbols static
On 2019-12-20 1:55 a.m., Chen Zhou wrote: > Make some structs and functions static to fix build warnings, parts of > warnings are as follows: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_resource.c:744:21: > warning: symbol 'dce110_clock_source_create' was not declared. Should > it be static? > drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_resource.c:768:6: > warning: symbol 'dce110_clock_source_destroy' was not declared. Should > it be static? > > Reported-by: Hulk Robot > Signed-off-by: Chen Zhou Reviewed-by: Harry Wentland Harry > --- > drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c > b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c > index bf14e9a..87227db 100644 > --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c > +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c > @@ -741,7 +741,7 @@ struct dce_i2c_hw *dce110_i2c_hw_create( > > return dce_i2c_hw; > } > -struct clock_source *dce110_clock_source_create( > +static struct clock_source *dce110_clock_source_create( > struct dc_context *ctx, > struct dc_bios *bios, > enum clock_source_id id, > @@ -765,7 +765,7 @@ struct clock_source *dce110_clock_source_create( > return NULL; > } > > -void dce110_clock_source_destroy(struct clock_source **clk_src) > +static void dce110_clock_source_destroy(struct clock_source **clk_src) > { > struct dce110_clk_src *dce110_clk_src; > > @@ -1007,7 +1007,7 @@ static bool dce110_validate_bandwidth( > return result; > } > > -enum dc_status dce110_validate_plane(const struct dc_plane_state > *plane_state, > +static enum dc_status dce110_validate_plane(const struct dc_plane_state > *plane_state, >struct dc_caps *caps) > { > if (((plane_state->dst_rect.width * 2) < plane_state->src_rect.width) || > @@ -1062,7 +1062,7 @@ static bool dce110_validate_surface_sets( > return true; > } > > -enum dc_status dce110_validate_global( > +static enum dc_status dce110_validate_global( > struct dc *dc, > struct dc_state *context) > { > @@ -1305,7 +1305,7 @@ static void bw_calcs_data_update_from_pplib(struct dc > *dc) > 1000); > } > > -const struct resource_caps *dce110_resource_cap( > +static const struct resource_caps *dce110_resource_cap( > struct hw_asic_id *asic_id) > { > if (ASIC_REV_IS_STONEY(asic_id->hw_internal_rev)) > ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel