lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2a608e8f-823a-7c01-8dc5-ad6c86e5f306@amd.com>
Date:   Mon, 10 Apr 2023 10:49:12 -0400
From:   Hamza Mahfooz <hamza.mahfooz@....com>
To:     Tom Rix <trix@...hat.com>, harry.wentland@....com,
        sunpeng.li@....com, Rodrigo.Siqueira@....com,
        alexander.deucher@....com, christian.koenig@....com,
        Xinhui.Pan@....com, airlied@...il.com, daniel@...ll.ch,
        Pavle.Kotarac@....com, Jun.Lei@....com,
        nicholas.kazlauskas@....com, Charlene.Liu@....com,
        aurabindo.pillai@....com, Dmytro.Laktyushkin@....com
Cc:     dri-devel@...ts.freedesktop.org, amd-gfx@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/amd/display: set variables dml*_funcs
 storage-class-specifier to static

On 4/8/23 09:43, Tom Rix wrote:
> smatch reports
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:44:24: warning: symbol
>    'dml20_funcs' was not declared. Should it be static?
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:51:24: warning: symbol
>    'dml20v2_funcs' was not declared. Should it be static?
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:58:24: warning: symbol
>    'dml21_funcs' was not declared. Should it be static?
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:65:24: warning: symbol
>    'dml30_funcs' was not declared. Should it be static?
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:72:24: warning: symbol
>    'dml31_funcs' was not declared. Should it be static?
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/display_mode_lib.c:79:24: warning: symbol
>    'dml314_funcs' was not declared. Should it be static?
> drivers/gpu/drm/amd/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 <trix@...hat.com>

Applied, thanks!

> ---
>   .../drm/amd/display/dc/dml/display_mode_lib.c | 24 +++++++++----------
>   1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c b/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
> index 4125d3d111d1..bdf3ac6cadd5 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c
> @@ -41,51 +41,51 @@
>   #include "dcn32/display_rq_dlg_calc_32.h"
>   #include "dml_logger.h"
>   
> -const struct dml_funcs dml20_funcs = {
> +static const struct dml_funcs dml20_funcs = {
>   	.validate = dml20_ModeSupportAndSystemConfigurationFull,
>   	.recalculate = dml20_recalculate,
>   	.rq_dlg_get_dlg_reg = dml20_rq_dlg_get_dlg_reg,
>   	.rq_dlg_get_rq_reg = dml20_rq_dlg_get_rq_reg
>   };
>   
> -const struct dml_funcs dml20v2_funcs = {
> +static const struct dml_funcs dml20v2_funcs = {
>   	.validate = dml20v2_ModeSupportAndSystemConfigurationFull,
>   	.recalculate = dml20v2_recalculate,
>   	.rq_dlg_get_dlg_reg = dml20v2_rq_dlg_get_dlg_reg,
>   	.rq_dlg_get_rq_reg = dml20v2_rq_dlg_get_rq_reg
>   };
>   
> -const struct dml_funcs dml21_funcs = {
> -        .validate = dml21_ModeSupportAndSystemConfigurationFull,
> -        .recalculate = dml21_recalculate,
> -        .rq_dlg_get_dlg_reg = dml21_rq_dlg_get_dlg_reg,
> -        .rq_dlg_get_rq_reg = dml21_rq_dlg_get_rq_reg
> +static const struct dml_funcs dml21_funcs = {
> +	.validate = dml21_ModeSupportAndSystemConfigurationFull,
> +	.recalculate = dml21_recalculate,
> +	.rq_dlg_get_dlg_reg = dml21_rq_dlg_get_dlg_reg,
> +	.rq_dlg_get_rq_reg = dml21_rq_dlg_get_rq_reg
>   };
>   
> -const struct dml_funcs dml30_funcs = {
> +static const struct dml_funcs dml30_funcs = {
>   	.validate = dml30_ModeSupportAndSystemConfigurationFull,
>   	.recalculate = dml30_recalculate,
>   	.rq_dlg_get_dlg_reg = dml30_rq_dlg_get_dlg_reg,
>   	.rq_dlg_get_rq_reg = dml30_rq_dlg_get_rq_reg
>   };
>   
> -const struct dml_funcs dml31_funcs = {
> +static const struct dml_funcs dml31_funcs = {
>   	.validate = dml31_ModeSupportAndSystemConfigurationFull,
>   	.recalculate = dml31_recalculate,
>   	.rq_dlg_get_dlg_reg = dml31_rq_dlg_get_dlg_reg,
>   	.rq_dlg_get_rq_reg = dml31_rq_dlg_get_rq_reg
>   };
>   
> -const struct dml_funcs dml314_funcs = {
> +static const struct dml_funcs dml314_funcs = {
>   	.validate = dml314_ModeSupportAndSystemConfigurationFull,
>   	.recalculate = dml314_recalculate,
>   	.rq_dlg_get_dlg_reg = dml314_rq_dlg_get_dlg_reg,
>   	.rq_dlg_get_rq_reg = dml314_rq_dlg_get_rq_reg
>   };
>   
> -const struct dml_funcs dml32_funcs = {
> +static const struct dml_funcs dml32_funcs = {
>   	.validate = dml32_ModeSupportAndSystemConfigurationFull,
> -    .recalculate = dml32_recalculate,
> +	.recalculate = dml32_recalculate,
>   	.rq_dlg_get_dlg_reg_v2 = dml32_rq_dlg_get_dlg_reg,
>   	.rq_dlg_get_rq_reg_v2 = dml32_rq_dlg_get_rq_reg
>   };
-- 
Hamza

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ