From patchwork Thu Jan 26 16:35:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 48795 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp367323wrn; Thu, 26 Jan 2023 08:38:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXvGPO1w2YvIxB0lJ/iSh5+nAqi+f721mHI73vT9KIbmRPHL99KrNFUnXEB1W73fChSdoeOl X-Received: by 2002:a17:907:674c:b0:7c4:fe36:5b80 with SMTP id qm12-20020a170907674c00b007c4fe365b80mr39788805ejc.62.1674751081261; Thu, 26 Jan 2023 08:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674751081; cv=none; d=google.com; s=arc-20160816; b=dVouK0a/uz2AcMK2iBj3CavUA05eTgO0Bt6Vt9RGXQSIg3uye5WaBCGXTRZ90fGFyt g2K8vSaHty9KoFLYdPB0gKo/PsMIshFYErenoP3jhXMlOSVwvHB9eqalz4qqolWX8cDY Xi3wauHFAywgV3RfA8kcwkghbZ479lt4Ab+Hop4zBC5fSN2zolkRmSt13B9f1Mtaexf2 tuhClWSMJiX/rkxEk5ffnxgEfY4wD8QEKx151L1R0Pt/eHfwD9/2xWMuZn3Yi1lghlwI O40qcukc9AvTDa/VocDjptTM5igS+8wxtAxzIt8aSB5Ni0b+8uwKRrthMSTVftYnhHPC Gt0w== 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=rb3/A1we/RbqV1f0fMuKx3toKnHu0wWDyGLqWe6q8bM=; b=wdeOUIcmcF5VL+fbfH2wcLDSmhoeZ0wsnvF7yNiiBhs3TXvCAB2BdKLmsimZoZ4TgT TiAADv7fKaFg0Ks7Lx/voYMqDILxOaKYORQpid9XAzR0C8/rqprXQw1j03kt5hYJMz1q rkDCAmgBN5mXWM3bZNVr/w8xlg7xOxhrnBjeQQfA5/yTYaZb4NbukIAF0oHNCXFTdg1f 1/8uagpv5fmf5L3z/Z8qBx0z35hRZ/uXqd3/bVcQtRV4gHUckQOwmQ5UcPbMWhOyNq2H uiajwip+zmZk9Xn3oNrAJ+gaE3iNR8f3Lx34T6YctK+L6yBiwQcbVYgooE4Cs/Zk36Fi jDvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jq6Mu7X3; 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 gh2-20020a1709073c0200b0084d172e0b0esi1848732ejc.35.2023.01.26.08.37.38; Thu, 26 Jan 2023 08:38:01 -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=Jq6Mu7X3; 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 S231360AbjAZQgd (ORCPT + 99 others); Thu, 26 Jan 2023 11:36:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231523AbjAZQgb (ORCPT ); Thu, 26 Jan 2023 11:36:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3E8B6B9A2 for ; Thu, 26 Jan 2023 08:36:12 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 39A91618D3 for ; Thu, 26 Jan 2023 16:36:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DACFAC433D2; Thu, 26 Jan 2023 16:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674750971; bh=NHe7c07kpgMGuREH7WhzPdLzzHD/XoCu9aMEENUsRB8=; h=From:To:Cc:Subject:Date:From; b=Jq6Mu7X3Hczk8L8xJev1HNltLPLpnttt8192JQyVScT0Kl5l9lHE7IKY5InhnkXip orDbczFBsTVbdfrrtDFaZVac4GQjK4YPhbX/2xPHcTMHcBG+2vbSu8JaT7xsW/8CmC jLNwog3vS7+Cw2iZ/rMcobUqrowChSuEttq6XlnJeVTIrXgrfSYGPUciQqyqs4rh1C JRxhmCinFJy5V9r78IpLrGkshwkajTNXpKef9gbyfM5cEwyZZGhziVUeVNFinQAsnO nQPO4RIOoc8vKMIStOO994qTh8heSri8qd8H1ZmJwar+k+iRJHZajuZizdFKZEUvli SVWtx9/qme7pQ== From: Arnd Bergmann To: Harry Wentland , Leo Li , Rodrigo Siqueira Cc: Arnd Bergmann , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Roman Li , Wayne Lin , Aurabindo Pillai , Stylon Wang , hersen wu , Lyude Paul , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amdgpu/display/mst: fix an unused-variable warning Date: Thu, 26 Jan 2023 17:35:54 +0100 Message-Id: <20230126163605.3524630-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?1756103789954243847?= X-GMAIL-MSGID: =?utf-8?q?1756103789954243847?= From: Arnd Bergmann The newly added code is in an #ifdef, so the variables that are only used in there cause a warning if CONFIG_DRM_AMD_DC_DCN is disabled: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_check': drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9698:43: error: unused variable 'mst_state' [-Werror=unused-variable] 9698 | struct drm_dp_mst_topology_state *mst_state; | ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9697:41: error: unused variable 'mgr' [-Werror=unused-variable] 9697 | struct drm_dp_mst_topology_mgr *mgr; | ^~~ Fixes: c689e1e362ea ("drm/amdgpu/display/mst: Fix mst_state->pbn_div and slot count assignments") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index be1232356f9e..c966bb05f6c7 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -9694,8 +9694,10 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev, struct drm_connector_state *old_con_state, *new_con_state; struct drm_crtc *crtc; struct drm_crtc_state *old_crtc_state, *new_crtc_state; +#if defined(CONFIG_DRM_AMD_DC_DCN) struct drm_dp_mst_topology_mgr *mgr; struct drm_dp_mst_topology_state *mst_state; +#endif struct drm_plane *plane; struct drm_plane_state *old_plane_state, *new_plane_state; enum dc_status status;