From patchwork Tue Jan 17 17:12:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 44757 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1881613wrn; Tue, 17 Jan 2023 09:22:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXsyJ0DItBJhGEO8oJ896b3wMPzIJwJJnr9iDWP2/sZbfafWBFXU58lHxN7yLkTSPWMpYLJi X-Received: by 2002:a05:6402:448a:b0:472:46bf:fb3c with SMTP id er10-20020a056402448a00b0047246bffb3cmr15493244edb.35.1673976134352; Tue, 17 Jan 2023 09:22:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673976134; cv=none; d=google.com; s=arc-20160816; b=Ty2/plcpGzl7/wadrN2jjFWoyu97cZUczSR2eHYtHLLmKALzk0QI8uKf46+XElsIaC pzIve+vtS0dD4AtatZjqUTTOxs9UreHFjF85l9PiO1LCD26dVWtJtnww0xO+mwNAU+cb GA3estcpDec7r02JGxiDt36Kfm4GW4aNNmsUwNNxMZgA+qcgLCrroKQ0wl7zoUyxPucs 6kb6/5xmnyzxvsaDTch4tBKMZLUGFPzMZVXpdLEj/CH051+sYwzRdv6W8CxwX8wacb1g +fJ5VIDC2WU9qC5Qkko9mziZuIkRpROoEA3Pwcu7OS2eFUC51PhDWaFbN7jJNPuZsmDc o3OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vt9SYkB8S7FLx07ulO6u3AGUSfBF3+zbeu4GHTyR3ZU=; b=m7a/jnClM8KPhQk+LDw4W47x1IyLUheUIMVPZHt8A50LCOa9CiX6MaR63M3lPYr3D/ 3hn6rlr3eLfHbcHihjCyAfSRNktR7eUTDgJYBZJmfDYiOIgftdKTFxRoYGDwXL20vB9M HRF2syyjHeiNNsDnn6afO75o2QyqBljLLOIlk+BnSvOdMkGgDZ3enZoQxhAdasLzQIvF 1ufZn1xf44zV8NI0Pkp+wKXWeM89h/iEt9/3ORt1Ch/pCvBa9vHTLhe1bxTvMCvMd9qS +BQYlVlcXiXO48lokIBM942nmq/+xKRazOkm2cXGJ9Rbri8rL3Zip2eiYQHD9/UsdKjb osGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZNGm4dQX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x22-20020aa7d6d6000000b0049e0ab14fc4si7925018edr.545.2023.01.17.09.21.50; Tue, 17 Jan 2023 09:22:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZNGm4dQX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235108AbjAQROy (ORCPT + 99 others); Tue, 17 Jan 2023 12:14:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235136AbjAQRO1 (ORCPT ); Tue, 17 Jan 2023 12:14:27 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66C654C0E4 for ; Tue, 17 Jan 2023 09:12:50 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 13A7AB8164B for ; Tue, 17 Jan 2023 17:12:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89186C433D2; Tue, 17 Jan 2023 17:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673975567; bh=WwkZdJTRH/e6oDjQt1JBj5r7Hxk3Sps4Rt8KnDt4/u0=; h=From:To:Cc:Subject:Date:From; b=ZNGm4dQXyPpdlm7+X9Q4CvkWy0n/zRxxC7Ir3C+TUbW7gC1qxMaaS5DvieEd5lipB enf5LpmFk7sumKBslDpDA4iwMbwtkaco2vtLfWHLz3agHqyEFmDjTuJvj0Hqv+zKSH xKKUwC0JlzGg23g4T8+MHo6zp64b1EiBKmdlrQG0n5hijI21iRv5HUdykcWJz24et2 SW/Lk95wWovkMoSGbJ5uySheXx62h3p13bsj02eTXe08CERf4E7LKK8dhRZGcGyr2n 3dKH6wXinGH1vHVrOkN39F4fDBMA8ZoaeOBIb5POjI4UKDLtvWiRuAT28+zz6P5aUF xKt199peEHU4A== From: Arnd Bergmann To: =?utf-8?q?Michel_D=C3=A4nzer?= , Harry Wentland , Leo Li , Rodrigo Siqueira Cc: Arnd Bergmann , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Wenjing Liu , George Shen , Jun Lei , Jimmy Kizito , Michael Strauss , Lewis Huang , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] [v2] drm/amd/display: fix dp_retrieve_lttpr_cap return code Date: Tue, 17 Jan 2023 18:12:24 +0100 Message-Id: <20230117171239.2714855-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755291199337074914?= X-GMAIL-MSGID: =?utf-8?q?1755291199337074914?= From: Arnd Bergmann 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 ' to 'enum dc_status' [-Werror=enum-conversion] 5075 | return false; | ^~~~~ Convert it to return 'DC_ERROR_UNEXPECTED', which was apparently set as a default return code here but never used. Fixes: b473bd5fc333 ("drm/amd/display: refine wake up aux in retrieve link caps") Signed-off-by: Arnd Bergmann --- v2 changes: - use DC_ERROR_UNEXPECTED instead of DC_OK - remove bogus initializers --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 9edfcdf3db3b..cf512362b4f1 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 @@ -5088,14 +5088,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.