Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6268294rwb; Wed, 18 Jan 2023 03:19:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXsZCWDObQL/8YX1+WTUqKG42DJi4370I/2jxLWqug2g8wx4MCWf9AsCwy9fgb0TM//YBjvB X-Received: by 2002:a17:90b:1094:b0:229:ab82:ba7 with SMTP id gj20-20020a17090b109400b00229ab820ba7mr5258809pjb.0.1674040756774; Wed, 18 Jan 2023 03:19:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674040756; cv=none; d=google.com; s=arc-20160816; b=VeEQNaPG5eBYpzT2Ge6t6Te2MiGsrX+6dZh3ystPO79ilqiCHuY8YGNAmHVBs5j7Lb phK1lbynJmEtlJJ76gTYRI/sd4c6UJtQFEMV4osbTmdqr1JOBdBDySW2b+JEvdmhYH3G Nw9VAUjd5Ztqnt/rNs/t7In0kTfoz65SbmeWsF6KSaUCuXXua1TnTGz2/TpFVQl/R7+W HZANBH4oF6+80EvFGpUMRxUzVQIxi2Pm3GFVG8kxAuUwT5YpyN6u9uzsiXifENoWn9y2 FPF/wKMFkaHVtYW/gmAbjjJtHydc4gMlxwabrVJvMgIRrVwQGdwnUGGIyXrYIIslctPs dM4A== 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=2Noj7igpP9sJcGSMAkX6qOpzLBCatBb5MkD06FRcp0M=; b=pD5aMn4zbs5Bh2uYSNvFSbGb58+v9i1klscro1qWR6xeHZyK95YWypX1L3Aod9fkdt Y8Y0GMNTdWy0xExU2F6G2I5vsTSYoJ/OlD7+uXQvb88TwIKEYiWxgiztGYbhDQIWaF0t sjwY1u7AIZryYU1/88sn6f+YGLCwy+Utq6habp0TRgioGgcCmgTtgJuoqTh0TePBpvPJ XcYMI5ZGjANgxkBFV766NlTBtryFcwWJMVm2HsE8M8ipQpvlLn9GOSOM/+RgJBFJ0RYo Z3grPWC/MxpgaqtHAOToq5qvLpYP6QIM8ONVOsfF170oxiUlf1pmIl60fKpJQ2WIO06R DONg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gwxTJQ77; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm13-20020a17090b3ecd00b00229b568de16si2014311pjb.164.2023.01.18.03.19.11; Wed, 18 Jan 2023 03:19:16 -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=gwxTJQ77; 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 S229689AbjARK0f (ORCPT + 45 others); Wed, 18 Jan 2023 05:26:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbjARKZ7 (ORCPT ); Wed, 18 Jan 2023 05:25:59 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 923E17D663 for ; Wed, 18 Jan 2023 01:30:21 -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 sin.source.kernel.org (Postfix) with ESMTPS id 07CDFCE1BDC for ; 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 Cc: Arnd Bergmann , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Wesley Chalmers , Wenjing Liu , Lewis Huang , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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 Content-Transfer-Encoding: 8bit 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 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. -- 2.39.0