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: <dc11c746-7d06-4b9f-ddc4-9b8e72297e3f@mailbox.org>
Date:   Thu, 15 Dec 2022 18:56:23 +0100
From:   Michel Dänzer <michel.daenzer@...lbox.org>
To:     Arnd Bergmann <arnd@...nel.org>,
        Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Rodrigo Siqueira <Rodrigo.Siqueira@....com>
Cc:     Alan Liu <HaoPing.Liu@....com>, Arnd Bergmann <arnd@...db.de>,
        "Pan, Xinhui" <Xinhui.Pan@....com>,
        Wenjing Liu <wenjing.liu@....com>,
        linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
        George Shen <george.shen@....com>,
        Alex Deucher <alexander.deucher@....com>,
        David Airlie <airlied@...il.com>,
        Christian König <christian.koenig@....com>
Subject: Re: [PATCH] drm/amd/display: fix dp_retrieve_lttpr_cap return code

On 12/15/22 17:37, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> The dp_retrieve_lttpr_cap() return type changed from 'bool'
> to 'enum dc_status', so now the early 'return' uses the wrong
> type:
> 
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c: In function 'dp_retrieve_lttpr_cap':
> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:5075:24: error: implicit conversion from 'enum <anonymous>' to 'enum dc_status' [-Werror=enum-conversion]
>  5075 |                 return false;
>       |                        ^~~~~
> 
> Convert it to return 'DC_OK', which is the same value as 'false'.
> 
> Fixes: b473bd5fc333 ("drm/amd/display: refine wake up aux in retrieve link caps")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> No idea if DC_OK is the intended return code, but it leaves the behavior
> unchanged and fixes the warning.
> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> index af9411ee3c74..95dbfa4e996a 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> @@ -5095,7 +5095,7 @@ enum dc_status dp_retrieve_lttpr_cap(struct dc_link *link)
>  	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_OK;

		return status;

seems more appropriate. (Otherwise the status = DC_ERROR_UNEXPECTED initialization has no effect)


-- 
Earthling Michel Dänzer            |                  https://redhat.com
Libre software enthusiast          |         Mesa and Xwayland developer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ