OSDN Git Service

drm/amd/display: remove redundant vertical_line_start variable
authorJinpeng Cui <cui.jinpeng2@zte.com.cn>
Mon, 29 Aug 2022 12:13:20 +0000 (12:13 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 29 Aug 2022 21:59:30 +0000 (17:59 -0400)
Return value from expression directly instead of
taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

index b92c14b..eda646b 100644 (file)
@@ -3776,7 +3776,6 @@ int dcn10_get_vupdate_offset_from_vsync(struct pipe_ctx *pipe_ctx)
        int vesa_sync_start;
        int asic_blank_end;
        int interlace_factor;
-       int vertical_line_start;
 
        patched_crtc_timing = *dc_crtc_timing;
        apply_front_porch_workaround(&patched_crtc_timing);
@@ -3792,10 +3791,8 @@ int dcn10_get_vupdate_offset_from_vsync(struct pipe_ctx *pipe_ctx)
                        patched_crtc_timing.v_border_top)
                        * interlace_factor;
 
-       vertical_line_start = asic_blank_end -
+       return asic_blank_end -
                        pipe_ctx->pipe_dlg_param.vstartup_start + 1;
-
-       return vertical_line_start;
 }
 
 void dcn10_calc_vupdate_position(