drm/amd/display: reduce scope for local var
authorAric Cyr <aric.cyr@amd.com>
Fri, 12 Feb 2021 23:30:08 +0000 (18:30 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Feb 2021 23:07:00 +0000 (18:07 -0500)
[Why]
No reason to have uninitialized var at top of function

[How]
Move it to minimum scope where it's actuallty used

Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Acked-by: Bindu Ramamurthy <bindu.r@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 7f9fc22..8a873af 100644 (file)
@@ -2348,7 +2348,6 @@ static void commit_planes_do_stream_update(struct dc *dc,
                struct dc_state *context)
 {
        int j;
-       bool should_program_abm;
 
        // Stream updates
        for (j = 0; j < dc->res_pool->pipe_count; j++) {
@@ -2424,7 +2423,7 @@ static void commit_planes_do_stream_update(struct dc *dc,
                        }
 
                        if (stream_update->abm_level && pipe_ctx->stream_res.abm) {
-                               should_program_abm = true;
+                               bool should_program_abm = true;
 
                                // if otg funcs defined check if blanked before programming
                                if (pipe_ctx->stream_res.tg->funcs->is_blanked)