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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4f359e30-90f8-c8bf-4e07-6856fcfd3506@gmail.com>
Date:   Mon, 25 Jul 2022 17:47:01 -0300
From:   Magali Lemes <magalilemes00@...il.com>
To:     André Almeida <andrealmeid@...lia.com>
Cc:     siqueirajordao@...eup.net, harry.wentland@....com,
        Xinhui.Pan@....com, christian.koenig@....com,
        alexander.deucher@....com, Rodrigo.Siqueira@....com,
        tales.aparecida@...il.com, linux-kernel@...r.kernel.org,
        amd-gfx@...ts.freedesktop.org, mwen@...lia.com,
        mairacanal@...eup.net, dri-devel@...ts.freedesktop.org,
        isabbasso@...eup.net, andrealmeid@...eup.net, sunpeng.li@....com,
        airlied@...ux.ie, daniel@...ll.ch
Subject: Re: [PATCH 1/2] drm/amd/display: change variables type


On 7/25/22 16:42, André Almeida wrote:
> Hi Magali,
>
> Às 15:15 de 25/07/22, Magali Lemes escreveu:
>> As "dcn3_15_soc" and "dcn3_16_soc" are of type "struct
>> _vcs_dpi_soc_bounding_box_st", change their types accordingly.
>>
> I can see that indeed this type change sense for those variables, but
> isn't a bit strange that the type was wrong in the first place? I wonder
> if this variable is even used, given that it would very likely throw a
> compiler error when using the wrong type and trying to access struct
> members that aren't defined.


A compilation error would be thrown if either 
"dc/dcn315/dcn315_resource.h" or "dc/dcn316/dcn316_resource.h" were 
included in the files where "dcn3_15_soc" and "dcn3_16_soc" are 
initialized. Since they are not included, the wrong variable type error 
is not shown.
To solve the sparse warning in the second patch of this series, those 
variables need to be declared first, but they are already declared, 
we're only missing the headers. If I only add the headers, then those 
variables will be seen, and I get the expected incompatible variables 
types error. So, fixing the types here is a preliminary work for the 
next patch.


Magali


>
>> Signed-off-by: Magali Lemes <magalilemes00@...il.com>
>> ---
>>   drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h | 2 +-
>>   drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h
>> index 39929fa67a51..45276317c057 100644
>> --- a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h
>> +++ b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.h
>> @@ -32,7 +32,7 @@
>>   	container_of(pool, struct dcn315_resource_pool, base)
>>   
>>   extern struct _vcs_dpi_ip_params_st dcn3_15_ip;
>> -extern struct _vcs_dpi_ip_params_st dcn3_15_soc;
>> +extern struct _vcs_dpi_soc_bounding_box_st dcn3_15_soc;
>>   
>>   struct dcn315_resource_pool {
>>   	struct resource_pool base;
>> diff --git a/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h b/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h
>> index 0dc5a6c13ae7..d2234aac5449 100644
>> --- a/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h
>> +++ b/drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.h
>> @@ -32,7 +32,7 @@
>>   	container_of(pool, struct dcn316_resource_pool, base)
>>   
>>   extern struct _vcs_dpi_ip_params_st dcn3_16_ip;
>> -extern struct _vcs_dpi_ip_params_st dcn3_16_soc;
>> +extern struct _vcs_dpi_soc_bounding_box_st dcn3_16_soc;
>>   
>>   struct dcn316_resource_pool {
>>   	struct resource_pool base;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ