Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp41992pxj; Wed, 16 Jun 2021 19:45:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2s+HKUQkgLnSAUUAiz0XH3yTs7z08CrdSkR/M5ZgeA9pIwUG0PQ5Jsvs5oWv0oTKeF7Kz X-Received: by 2002:a92:c989:: with SMTP id y9mr1894445iln.228.1623897929850; Wed, 16 Jun 2021 19:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623897929; cv=none; d=google.com; s=arc-20160816; b=CC8yZtU+MuMIpGVsYjbTRdqZYeH5JUo1NYu5dAxySyEvJ/TybbhTcG3RGCEuH5d6rH 99AvhglAjoaBqtRrse8pLNE8xFtGbjdf+00g7CwX0mlNj6Uy7tz+qDrfaAIZYfGS/vbL QdAnbGCKliyTi2glCjSFl/GE8c9YnmgsEVC1kgi19TwsqayMTEb+bSxwo7Zaa8ke2fLW 7pQOwJvcdJI3pYxBTTRiViFFAVDntK9zzPVqBW7NXX/UI23yNiIRooxxDCrZaBI4gron jIdsHjy8byYdCJWYZYzeVS6hbUZ/7Gt0UVxcvfk/cORT0tqJXStZr8jpblZ86kHnYUJ+ mrGw== 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; bh=IEUN7JJx8cQ/rkvK0SE0vsHwDyP0O1Xw3OFCfZuIeBk=; b=ekCI8mL2PwGVfDwoDmGfGQJCY5um6BZP36C6W3GTosCEWLdgdiI96/3fCkunrJQusv iMgmCySC5/GeJWPChjAwd4P1DWh8vNFgL+X78RG1QSkrspkVWbgOk8ef7vkQc3pRlmWy nwq7yYQSgJNSNXWb7xAU0wJgPmgYYF+aRiuYiGOyugxtwbhNE0r4Tt01/pHG/5GYuVw6 wxdiEtCkHDHx0Vt+lMn7k0fe/Fo+JlSr2xBmeA075QmsGwXHJAUOdJvwWE6IsuLif4mY h/IDBe6UpqWQkjf4RTJ7TSsUhVQtJNOhAr4GBAmK4j9Epni3e/YsmpwF+dC2Iw+faOUv Az3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si4308329jaq.75.2021.06.16.19.45.17; Wed, 16 Jun 2021 19:45:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231955AbhFQBRw (ORCPT + 99 others); Wed, 16 Jun 2021 21:17:52 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:11043 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231912AbhFQBRv (ORCPT ); Wed, 16 Jun 2021 21:17:51 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G53vL4VqgzZfjy; Thu, 17 Jun 2021 09:12:46 +0800 (CST) Received: from dggpemm500019.china.huawei.com (7.185.36.180) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 17 Jun 2021 09:15:42 +0800 Received: from ubuntu1804.huawei.com (10.67.174.98) by dggpemm500019.china.huawei.com (7.185.36.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 17 Jun 2021 09:15:42 +0800 From: Pu Lehui To: , , , , , , , , , CC: , , , , Subject: [PATCH -next] drm/amd/display: remove unused variable 'dc' Date: Thu, 17 Jun 2021 09:16:32 +0800 Message-ID: <20210617011632.187690-1-pulehui@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.174.98] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500019.china.huawei.com (7.185.36.180) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GCC reports the following warning with W=1: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_psr.c:70:13: warning: variable ‘dc’ set but not used [-Wunused-but-set-variable] 70 | struct dc *dc = NULL; | ^~ This variable is not used in function, this commit remove it to fix the warning. Signed-off-by: Pu Lehui --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c index f7c77ae0d965..70a554f1e725 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c @@ -67,14 +67,12 @@ bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream) struct dc_link *link = NULL; struct psr_config psr_config = {0}; struct psr_context psr_context = {0}; - struct dc *dc = NULL; bool ret = false; if (stream == NULL) return false; link = stream->link; - dc = link->ctx->dc; psr_config.psr_version = link->dpcd_caps.psr_caps.psr_version; -- 2.17.1