lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <56712ad5-ed41-4d64-a317-10cc1275137a@moroto.mountain>
Date: Sat, 16 Mar 2024 12:28:06 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Harry Wentland <harry.wentland@....com>
Cc: Leo Li <sunpeng.li@....com>,
	Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
	Alex Deucher <alexander.deucher@....com>,
	Christian König <christian.koenig@....com>,
	"Pan, Xinhui" <Xinhui.Pan@....com>,
	David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
	Nicholas Kazlauskas <nicholas.kazlauskas@....com>,
	Charlene Liu <charlene.liu@....com>, Jun Lei <jun.lei@....com>,
	Alex Hung <alex.hung@....com>, Daniel Miess <daniel.miess@....com>,
	Sung Joon Kim <sungkim@....com>,
	Yang Li <yang.lee@...ux.alibaba.com>, amd-gfx@...ts.freedesktop.org,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: [PATCH] drm/amd/display: delete unnecessary check in
 dcn35_set_long_vblank()

"timing" is "&pipe_ctx[i]->stream->timing" where ->timing is not the
first struct member of ->stream.  So it's the address which points into
the middle of a struct.  It can't be NULL so delete the NULL check.

Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
 drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
index 2e8ec58a16eb..87cfd9f1cec9 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
@@ -1411,10 +1411,7 @@ void dcn35_set_long_vblank(struct pipe_ctx **pipe_ctx,
 		if (pipe_ctx[i]->stream) {
 			struct dc_crtc_timing *timing = &pipe_ctx[i]->stream->timing;
 
-			if (timing)
-				params.vertical_blank_start = timing->v_total - timing->v_front_porch;
-			else
-				params.vertical_blank_start = 0;
+			params.vertical_blank_start = timing->v_total - timing->v_front_porch;
 
 			if ((pipe_ctx[i]->stream_res.tg != NULL) && pipe_ctx[i]->stream_res.tg->funcs &&
 				pipe_ctx[i]->stream_res.tg->funcs->set_long_vtotal)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ