[PATCH 1/4] drm/amd/display: remove set but not used variable 'dc'

Zheng Bin zhengbin13 at huawei.com
Thu Apr 30 03:40:31 UTC 2020


Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8665:13: warning: variable ‘dc’ set but not used [-Wunused-but-set-variable]

It is not used since commit d1ebfdd8d0fc ("drm/amd/display:
Unify psr feature flags")

Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: Zheng Bin <zhengbin13 at huawei.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
 1 file changed, 2 deletions(-)

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 98f39db81c7b..8e46524e67a9 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8662,14 +8662,12 @@ static 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.26.0.106.g9fadedd



More information about the amd-gfx mailing list