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: <20210709094144.118920-1-dingsenjie@163.com>
Date:   Fri,  9 Jul 2021 17:41:44 +0800
From:   dingsenjie@....com
To:     robdclark@...il.com, sean@...rly.run, airlied@...ux.ie,
        daniel@...ll.ch
Cc:     linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        dingsenjie <dingsenjie@...ong.com>
Subject: [PATCH] gpu: drm: Remove unneeded variable: "ret"

From: dingsenjie <dingsenjie@...ong.com>

remove unneeded variable: "ret".

Signed-off-by: dingsenjie <dingsenjie@...ong.com>
---
 drivers/gpu/drm/msm/dp/dp_ctrl.c |  4 +---
 drivers/gpu/drm/msm/dp/dp_link.c | 13 ++++---------
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index e3462f5..0d11046 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -1052,7 +1052,6 @@ static bool dp_ctrl_train_pattern_set(struct dp_ctrl_private *ctrl,
 		u8 pattern)
 {
 	u8 buf;
-	int ret = 0;
 
 	DRM_DEBUG_DP("sink: pattern=%x\n", pattern);
 
@@ -1061,8 +1060,7 @@ static bool dp_ctrl_train_pattern_set(struct dp_ctrl_private *ctrl,
 	if (pattern && pattern != DP_TRAINING_PATTERN_4)
 		buf |= DP_LINK_SCRAMBLING_DISABLE;
 
-	ret = drm_dp_dpcd_writeb(ctrl->aux, DP_TRAINING_PATTERN_SET, buf);
-	return ret == 1;
+	return drm_dp_dpcd_writeb(ctrl->aux, DP_TRAINING_PATTERN_SET, buf) == 1;
 }
 
 static int dp_ctrl_read_link_status(struct dp_ctrl_private *ctrl,
diff --git a/drivers/gpu/drm/msm/dp/dp_link.c b/drivers/gpu/drm/msm/dp/dp_link.c
index be986da..fee3bc4 100644
--- a/drivers/gpu/drm/msm/dp/dp_link.c
+++ b/drivers/gpu/drm/msm/dp/dp_link.c
@@ -782,7 +782,6 @@ static int dp_link_process_link_training_request(struct dp_link_private *link)
 bool dp_link_send_test_response(struct dp_link *dp_link)
 {
 	struct dp_link_private *link = NULL;
-	int ret = 0;
 
 	if (!dp_link) {
 		DRM_ERROR("invalid input\n");
@@ -791,10 +790,8 @@ bool dp_link_send_test_response(struct dp_link *dp_link)
 
 	link = container_of(dp_link, struct dp_link_private, dp_link);
 
-	ret = drm_dp_dpcd_writeb(link->aux, DP_TEST_RESPONSE,
-			dp_link->test_response);
-
-	return ret == 1;
+	return drm_dp_dpcd_writeb(link->aux, DP_TEST_RESPONSE,
+			dp_link->test_response) == 1;
 }
 
 int dp_link_psm_config(struct dp_link *dp_link,
@@ -829,7 +826,6 @@ int dp_link_psm_config(struct dp_link *dp_link,
 bool dp_link_send_edid_checksum(struct dp_link *dp_link, u8 checksum)
 {
 	struct dp_link_private *link = NULL;
-	int ret = 0;
 
 	if (!dp_link) {
 		DRM_ERROR("invalid input\n");
@@ -838,9 +834,8 @@ bool dp_link_send_edid_checksum(struct dp_link *dp_link, u8 checksum)
 
 	link = container_of(dp_link, struct dp_link_private, dp_link);
 
-	ret = drm_dp_dpcd_writeb(link->aux, DP_TEST_EDID_CHECKSUM,
-						checksum);
-	return ret == 1;
+	return drm_dp_dpcd_writeb(link->aux, DP_TEST_EDID_CHECKSUM,
+						checksum) == 1;
 }
 
 static int dp_link_parse_vx_px(struct dp_link_private *link)
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ