* [PATCH] drm/amd/display: fix dp_retrieve_lttpr_cap() return value
@ 2023-01-18 9:29 Arnd Bergmann
2023-01-18 16:27 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-01-18 9:29 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira
Cc: Arnd Bergmann, Alex Deucher, Christian König, Pan, Xinhui,
David Airlie, Daniel Vetter, Wesley Chalmers, Wenjing Liu,
Lewis Huang, amd-gfx, dri-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
gcc-13 notices a mismatch between the return type of dp_retrieve_lttpr_cap()
and the returned value:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c: In function 'dp_retrieve_lttpr_cap':
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1465:24: error: implicit conversion from 'enum <anonymous>' to 'enum dc_status' [-Werror=enum-conversion]
1465 | return false;
| ^~~~~
Change the value to an actual dc_status code and remove the bogus
initialization that was apparently meant to get returned here.
Fixes: b473bd5fc333 ("drm/amd/display: refine wake up aux in retrieve link caps")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c
index 088f4291bfbf..e72ad1b8330f 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c
@@ -1455,14 +1455,14 @@ static bool dpcd_read_sink_ext_caps(struct dc_link *link)
enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link)
{
uint8_t lttpr_dpcd_data[8];
- enum dc_status status = DC_ERROR_UNEXPECTED;
- bool is_lttpr_present = false;
+ enum dc_status status;
+ bool is_lttpr_present;
/* Logic to determine LTTPR support*/
bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware;
if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout_support)
- return false;
+ return DC_ERROR_UNEXPECTED;
/* By reading LTTPR capability, RX assumes that we will enable
* LTTPR extended aux timeout if LTTPR is present.
--
2.39.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/display: fix dp_retrieve_lttpr_cap() return value
2023-01-18 9:29 [PATCH] drm/amd/display: fix dp_retrieve_lttpr_cap() return value Arnd Bergmann
@ 2023-01-18 16:27 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2023-01-18 16:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Lewis Huang,
Wesley Chalmers, Arnd Bergmann, Pan, Xinhui, Wenjing Liu,
linux-kernel, amd-gfx, dri-devel, Alex Deucher,
Christian König
Applied. Thanks!
Alex
On Wed, Jan 18, 2023 at 4:30 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> gcc-13 notices a mismatch between the return type of dp_retrieve_lttpr_cap()
> and the returned value:
>
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c: In function 'dp_retrieve_lttpr_cap':
> drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dp_capability.c:1465:24: error: implicit conversion from 'enum <anonymous>' to 'enum dc_status' [-Werror=enum-conversion]
> 1465 | return false;
> | ^~~~~
>
> Change the value to an actual dc_status code and remove the bogus
> initialization that was apparently meant to get returned here.
>
> Fixes: b473bd5fc333 ("drm/amd/display: refine wake up aux in retrieve link caps")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c
> index 088f4291bfbf..e72ad1b8330f 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/link_dp_capability.c
> @@ -1455,14 +1455,14 @@ static bool dpcd_read_sink_ext_caps(struct dc_link *link)
> enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link)
> {
> uint8_t lttpr_dpcd_data[8];
> - enum dc_status status = DC_ERROR_UNEXPECTED;
> - bool is_lttpr_present = false;
> + enum dc_status status;
> + bool is_lttpr_present;
>
> /* Logic to determine LTTPR support*/
> bool vbios_lttpr_interop = link->dc->caps.vbios_lttpr_aware;
>
> if (!vbios_lttpr_interop || !link->dc->caps.extended_aux_timeout_support)
> - return false;
> + return DC_ERROR_UNEXPECTED;
>
> /* By reading LTTPR capability, RX assumes that we will enable
> * LTTPR extended aux timeout if LTTPR is present.
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-18 16:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18 9:29 [PATCH] drm/amd/display: fix dp_retrieve_lttpr_cap() return value Arnd Bergmann
2023-01-18 16:27 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox