[PATCH] gpu: drm: Remove unneeded variable: "ret"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: dingsenjie <dingsenjie@xxxxxxxxxx>

remove unneeded variable: "ret".

Signed-off-by: dingsenjie <dingsenjie@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux