From patchwork Wed Jan 18 09:29:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13105962 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5F30C32793 for ; Wed, 18 Jan 2023 09:30:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CB8C810E225; Wed, 18 Jan 2023 09:30:27 +0000 (UTC) Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id D099C10E225; Wed, 18 Jan 2023 09:30:25 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 0B039CE1BDD; Wed, 18 Jan 2023 09:30:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 303B3C433D2; Wed, 18 Jan 2023 09:30:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674034218; bh=pUmitdCWgBZAVCI5fSjyfp0oSa/dGTogN9eI1BRZzrs=; h=From:To:Cc:Subject:Date:From; b=gwxTJQ77MUNvbysMBAN4/g9PBW68M3KSkeVAUYbBd4nDgMtihXlrtfGnEp8W+P5Mw fizsYN1JvKhCZcRTxr1+ZE5zMGsWBd4fxLYarfFaoSu3434LeHKYeU5ysqFW2t+zGx ucnrF/g1B5QlWKw0pwjH5xmPL+Pn7Zlpo7cEbe2tJr3ry9B1sDmJKMjxwLMAyGiWph fWVTfk+d1eO9xgH8qV9r4+p8z96Y3nnfvRl+Qa86z0XtLf6TYOEcT+ra9rezyV9u7k XtnDrzzgtIAClHuwHcPK6hCZ6QRdYIRocPww2ORNSIxuIUGhbpOiagnxV7aEdzvgCp oT01Ddi2oC/2Q== From: Arnd Bergmann To: Harry Wentland , Leo Li , Rodrigo Siqueira Subject: [PATCH] drm/amd/display: fix dp_retrieve_lttpr_cap() return value Date: Wed, 18 Jan 2023 10:29:56 +0100 Message-Id: <20230118093011.3796248-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lewis Huang , Wesley Chalmers , Arnd Bergmann , "Pan, Xinhui" , Wenjing Liu , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann 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 ' 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 --- 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.