drm/amd/display: change several dcn30 variables storage-class-specifier to static
Commit Message
smatch reports these similar problems in dcn30
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dwb.c:223:25:
warning: symbol 'dcn30_dwbc_funcs' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mmhubbub.c:214:28:
warning: symbol '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 <trix@redhat.com>
---
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb.c | 2 +-
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c | 2 +-
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Comments
Applied. Thanks!
Alex
On Sun, Mar 5, 2023 at 7:52 AM Tom Rix <trix@redhat.com> wrote:
>
> smatch reports these similar problems in dcn30
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dwb.c:223:25:
> warning: symbol 'dcn30_dwbc_funcs' was not declared. Should it be static?
> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mmhubbub.c:214:28:
> warning: symbol '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 <trix@redhat.com>
> ---
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb.c | 2 +-
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c | 2 +-
> drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb.c
> index f14f69616692..0d98918bf0fc 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb.c
> @@ -220,7 +220,7 @@ void dwb3_set_denorm(struct dwbc *dwbc, struct dc_dwb_params *params)
> }
>
>
> -const struct dwbc_funcs dcn30_dwbc_funcs = {
> +static const struct dwbc_funcs dcn30_dwbc_funcs = {
> .get_caps = dwb3_get_caps,
> .enable = dwb3_enable,
> .disable = dwb3_disable,
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c
> index 7a93eff183d9..6f2a0d5d963b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c
> @@ -211,7 +211,7 @@ static void mmhubbub3_config_mcif_arb(struct mcif_wb *mcif_wb,
> REG_UPDATE(MCIF_WB_ARBITRATION_CONTROL, MCIF_WB_CLIENT_ARBITRATION_SLICE, params->arbitration_slice);
> }
>
> -const struct mcif_wb_funcs dcn30_mmhubbub_funcs = {
> +static const struct mcif_wb_funcs dcn30_mmhubbub_funcs = {
> .warmup_mcif = mmhubbub3_warmup_mcif,
> .enable_mcif = mmhubbub2_enable_mcif,
> .disable_mcif = mmhubbub2_disable_mcif,
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> index ad1c1b703874..6cf40c1332bc 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
> @@ -1399,7 +1399,7 @@ static void mpc3_set_mpc_mem_lp_mode(struct mpc *mpc)
> }
> }
>
> -const struct mpc_funcs dcn30_mpc_funcs = {
> +static const struct mpc_funcs dcn30_mpc_funcs = {
> .read_mpcc_state = mpc1_read_mpcc_state,
> .insert_plane = mpc1_insert_plane,
> .remove_mpcc = mpc1_remove_mpcc,
> --
> 2.27.0
>
@@ -220,7 +220,7 @@ void dwb3_set_denorm(struct dwbc *dwbc, struct dc_dwb_params *params)
}
-const struct dwbc_funcs dcn30_dwbc_funcs = {
+static const struct dwbc_funcs dcn30_dwbc_funcs = {
.get_caps = dwb3_get_caps,
.enable = dwb3_enable,
.disable = dwb3_disable,
@@ -211,7 +211,7 @@ static void mmhubbub3_config_mcif_arb(struct mcif_wb *mcif_wb,
REG_UPDATE(MCIF_WB_ARBITRATION_CONTROL, MCIF_WB_CLIENT_ARBITRATION_SLICE, params->arbitration_slice);
}
-const struct mcif_wb_funcs dcn30_mmhubbub_funcs = {
+static const struct mcif_wb_funcs dcn30_mmhubbub_funcs = {
.warmup_mcif = mmhubbub3_warmup_mcif,
.enable_mcif = mmhubbub2_enable_mcif,
.disable_mcif = mmhubbub2_disable_mcif,
@@ -1399,7 +1399,7 @@ static void mpc3_set_mpc_mem_lp_mode(struct mpc *mpc)
}
}
-const struct mpc_funcs dcn30_mpc_funcs = {
+static const struct mpc_funcs dcn30_mpc_funcs = {
.read_mpcc_state = mpc1_read_mpcc_state,
.insert_plane = mpc1_insert_plane,
.remove_mpcc = mpc1_remove_mpcc,