From: Magali Lemes <magalilemes00@gmail.com>
To: "André Almeida" <andrealmeid@igalia.com>
Cc: siqueirajordao@riseup.net, harry.wentland@amd.com,
Xinhui.Pan@amd.com, christian.koenig@amd.com,
alexander.deucher@amd.com, Rodrigo.Siqueira@amd.com,
tales.aparecida@gmail.com, linux-kernel@vger.kernel.org,
amd-gfx@lists.freedesktop.org, mwen@igalia.com,
mairacanal@riseup.net, dri-devel@lists.freedesktop.org,
isabbasso@riseup.net, andrealmeid@riseup.net, sunpeng.li@amd.com,
airlied@linux.ie, daniel@ffwll.ch
Subject: Re: [PATCH 1/2] drm/amd/display: change variables type
Date: Mon, 25 Jul 2022 17:47:01 -0300 [thread overview]
Message-ID: <4f359e30-90f8-c8bf-4e07-6856fcfd3506@gmail.com> (raw)
In-Reply-To: <a7589316-2a55-85f2-b665-5fe4bebf7a69@igalia.com>
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@gmail.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;
next prev parent reply other threads:[~2022-07-25 20:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 18:15 [PATCH 1/2] drm/amd/display: change variables type Magali Lemes
2022-07-25 18:15 ` [PATCH 2/2] drm/amd/display: include missing headers Magali Lemes
2022-07-25 23:58 ` Melissa Wen
2022-07-25 19:42 ` [PATCH 1/2] drm/amd/display: change variables type André Almeida
2022-07-25 20:47 ` Magali Lemes [this message]
2022-07-25 23:38 ` Melissa Wen
2022-07-26 12:06 ` Magali Lemes
2022-07-27 0:11 ` Melissa Wen
2022-07-26 20:09 ` André Almeida
2022-07-25 21:18 ` Maíra Canal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f359e30-90f8-c8bf-4e07-6856fcfd3506@gmail.com \
--to=magalilemes00@gmail.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrealmeid@igalia.com \
--cc=andrealmeid@riseup.net \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=isabbasso@riseup.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mairacanal@riseup.net \
--cc=mwen@igalia.com \
--cc=siqueirajordao@riseup.net \
--cc=sunpeng.li@amd.com \
--cc=tales.aparecida@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox