Skip to contentSkip to conversation

drm/amd/display: remove unused variable 'dc'

PATCH Applied Pu Lehui 3 participants 3 messages Jun 17, 2021 – Jun 18, 2021

Subsystems (3)
lore
Share & tools
lore

Pu Lehui

author
#0 lore raw

PATCH 1/1 drm/amd/display: remove unused variable 'dc'

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.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +0 -2
index f7c77ae0d965..70a554f1e725 100644
@@ -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;
 
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Pu Lehui

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]

Quoted 7 lines
    70 |  struct dc *dc = NULL;
       |             ^~

This variable is not used in function, this commit remove it to fix the warning.

Harry

Quoted 14 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +0 -1
index f7c77ae0d965..70a554f1e725 100644
@@ -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;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream) · line 78

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +0 -1
 	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;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Applied
#2 lore raw

Applied. Thanks!

Quoted 50 lines · Harry Wentland
Quoted 5 lines · Pu Lehui

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]

Quoted 7 lines
    70 |  struct dc *dc = NULL;
       |             ^~

This variable is not used in function, this commit remove it to fix the warning.

Harry

Quoted 14 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +0 -1
index f7c77ae0d965..70a554f1e725 100644
@@ -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;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream) · line 78

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +0 -1
      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;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx