]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Silence unused variable warning
authorClay King <clayking@amd.com>
Fri, 20 Feb 2026 16:25:47 +0000 (11:25 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Mar 2026 21:39:07 +0000 (16:39 -0500)
[WHY & HOW]
Remove unused dpp_pipe_count variable.

Reviewed-by: Austin Zheng <austin.zheng@amd.com>
Signed-off-by: Clay King <clayking@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_dc_resource_mgmt.c

index 4cfe64aa84927765d0dc1357fcf362144e7b5e92..74812a7d5e28c1fd5e2403188ff176dab7da911b 100644 (file)
@@ -909,10 +909,10 @@ static unsigned int get_source_mpc_factor(const struct dml2_context *ctx,
                const struct dc_plane_state *plane)
 {
        struct pipe_ctx *dpp_pipes[MAX_PIPES] = {0};
-       int dpp_pipe_count = ctx->config.callbacks.get_dpp_pipes_for_plane(plane,
-                       &state->res_ctx, dpp_pipes);
 
-       ASSERT(dpp_pipe_count > 0);
+       if (ctx->config.callbacks.get_dpp_pipes_for_plane(plane, &state->res_ctx, dpp_pipes) <= 0)
+               ASSERT(false);
+
        return ctx->config.callbacks.get_mpc_slice_count(dpp_pipes[0]);
 }