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>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180803115013epcas5p2abd0af8d1ada31e66d5c6ae38ec1a9a8~HXYKay9FL3208432084epcas5p2v@epcas5p2.samsung.com>
Date:   Fri,  3 Aug 2018 17:18:37 +0530
From:   Satendra Singh Thakur <satendra.t@...sung.com>
To:     Gustavo Padovan <gustavo@...ovan.org>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Sean Paul <seanpaul@...omium.org>,
        David Airlie <airlied@...ux.ie>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc:     vineet.j@...sung.com, hemanshu.s@...sung.com, sst2005@...il.com,
        Satendra Singh Thakur <satendra.t@...sung.com>
Subject: [PATCH v1] drm/kms/atomic: Improved the func
 drm_atomic_set_crtc_for_connector

1. Currently conn_state->crtc is getting assigned a value at two places
   We can just reduce this assignment to one

Signed-off-by: Satendra Singh Thakur <satendra.t@...sung.com>
---
 v1: Hi Mr Maarten, Thanks for the comments.
 I have modified the patch suitably. Please review.
 
 drivers/gpu/drm/drm_atomic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 895741e..560b01c 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1559,7 +1559,6 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
 			~(1 << drm_connector_index(conn_state->connector));
 
 		drm_connector_put(conn_state->connector);
-		conn_state->crtc = NULL;
 	}
 
 	if (crtc) {
@@ -1571,7 +1570,6 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
 			1 << drm_connector_index(conn_state->connector);
 
 		drm_connector_get(conn_state->connector);
-		conn_state->crtc = crtc;
 
 		DRM_DEBUG_ATOMIC("Link connector state %p to [CRTC:%d:%s]\n",
 				 conn_state, crtc->base.id, crtc->name);
@@ -1579,6 +1577,7 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
 		DRM_DEBUG_ATOMIC("Link connector state %p to [NOCRTC]\n",
 				 conn_state);
 	}
+	conn_state->crtc = crtc;
 
 	return 0;
 }
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ