linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] drm/amd/display: remove redundant vertical_line_start variable
@ 2022-08-29 12:13 cgel.zte
  2022-08-29 19:45 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-08-29 12:13 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
	christian.koenig, Xinhui.Pan, airlied, daniel, Anthony.Koo,
	alex.hung, Roman.Li, Yi-Ling.Chen2, hanghong.ma, mwen,
	dingchen.zhang
  Cc: Jerry.Zuo, agustin.gutierrez, dale.zhao, isabbasso, Sungjoon.Kim,
	amd-gfx, dri-devel, linux-kernel, Jinpeng Cui, Zeal Robot

From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

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>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index 37246e965457..8f4f1ea447a7 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -3741,7 +3741,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);
@@ -3757,10 +3756,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(
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH linux-next] drm/amd/display: remove redundant vertical_line_start variable
  2022-08-29 12:13 [PATCH linux-next] drm/amd/display: remove redundant vertical_line_start variable cgel.zte
@ 2022-08-29 19:45 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2022-08-29 19:45 UTC (permalink / raw)
  To: cgel.zte
  Cc: harry.wentland, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
	christian.koenig, Xinhui.Pan, airlied, daniel, Anthony.Koo,
	alex.hung, Roman.Li, Yi-Ling.Chen2, hanghong.ma, mwen,
	dingchen.zhang, dale.zhao, Zeal Robot, linux-kernel, amd-gfx,
	Jerry.Zuo, dri-devel, isabbasso, Jinpeng Cui, agustin.gutierrez,
	Sungjoon.Kim

Applied.  Thanks!

Alex

On Mon, Aug 29, 2022 at 8:13 AM <cgel.zte@gmail.com> wrote:
>
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> 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>
> ---
>  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> index 37246e965457..8f4f1ea447a7 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
> @@ -3741,7 +3741,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);
> @@ -3757,10 +3756,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(
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-29 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29 12:13 [PATCH linux-next] drm/amd/display: remove redundant vertical_line_start variable cgel.zte
2022-08-29 19:45 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).