Skip to contentSkip to conversation

drm/amd/display: remove set but unused variable

PATCH In review Alex Deucher 2 participants 3 messages Jul 6, 2022

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/2 drm/amd/display: remove set but unused variable

Fixes the following:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:428:33: warning: variable 'old_pipe' set but not used

---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +1 -2
index baaeaaff23df..3f42df525c0a 100644
@@ -425,11 +425,10 @@ void dcn32_subvp_pipe_control_lock(struct dc *dc,
 	bool subvp_immediate_flip = false;
 	bool subvp_in_use = false;
 	bool drr_pipe = false;
-	struct pipe_ctx *pipe, *old_pipe;
+	struct pipe_ctx *pipe;
 
 	for (i = 0; i < dc->res_pool->pipe_count; i++) {
 		pipe = &context->res_ctx.pipe_ctx[i];
-		old_pipe = &dc->current_state->res_ctx.pipe_ctx[i];
 
 		if (pipe->stream && pipe->plane_state && pipe->stream->mall_stream_config.type == SUBVP_MAIN) {
 			subvp_in_use = true;
Signature · 1 line
2.35.3
author maintainer
#1 lore raw

PATCH 2/2 drm/amd/display: make get_refresh_rate() static

It's not used outside of dcn30_resource.c.

---
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +1 -1
index 4f684235a413..7f01463942fb 100644
@@ -1899,7 +1899,7 @@ noinline bool dcn30_internal_validate_bw(
 	return out;
 }
 
-int get_refresh_rate(struct dc_state *context)
+static int get_refresh_rate(struct dc_state *context)
 {
 	int refresh_rate = 0;
 	int h_v_total = 0;
Signature · 1 line
2.35.3
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/amd/display: make get_refresh_rate() static

Quoted 5 lines · Alex Deucher

It's not used outside of dcn30_resource.c.

---

Both patches are

Harry

Quoted 16 lines
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +1 -1
index 4f684235a413..7f01463942fb 100644
@@ -1899,7 +1899,7 @@ noinline bool dcn30_internal_validate_bw(
 	return out;
 }
 
-int get_refresh_rate(struct dc_state *context)
+static int get_refresh_rate(struct dc_state *context)
 {
 	int refresh_rate = 0;
 	int h_v_total = 0;