public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] video: exynos: remove redundant assignments
@ 2018-03-18 13:56 Heinrich Schuchardt
  2018-03-19  6:46 ` Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2018-03-18 13:56 UTC (permalink / raw)
  To: u-boot

No need to initialize variables if the next usage is an assignment.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/video/exynos/exynos_dp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index 30e4020686..2f724ee745 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -321,7 +321,7 @@ static unsigned int exynos_dp_link_start(struct exynos_dp *regs,
 
 static unsigned int exynos_dp_training_pattern_dis(struct exynos_dp *regs)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 
 	exynos_dp_set_training_pattern(regs, DP_NONE);
 
@@ -339,7 +339,7 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode(
 		struct exynos_dp *regs, unsigned char enable)
 {
 	unsigned char data;
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 
 	ret = exynos_dp_read_byte_from_dpcd(regs, DPCD_LANE_COUNT_SET,
 					    &data);
@@ -366,7 +366,7 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode(
 static unsigned int exynos_dp_set_enhanced_mode(struct exynos_dp *regs,
 						unsigned char enhance_mode)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret
 
 	ret = exynos_dp_enable_rx_to_enhanced_mode(regs, enhance_mode);
 	if (ret != EXYNOS_DP_SUCCESS) {
@@ -416,7 +416,7 @@ static int exynos_dp_read_dpcd_lane_stat(struct exynos_dp *regs,
 static unsigned int exynos_dp_read_dpcd_adj_req(struct exynos_dp *regs,
 		unsigned char lane_num, unsigned char *sw, unsigned char *em)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 	unsigned char buf;
 	unsigned int dpcd_addr;
 	unsigned char shift_val[DP_LANE_CNT_4] = {0, 4, 0, 4};
@@ -484,7 +484,7 @@ static int exynos_dp_reduce_link_rate(struct exynos_dp *regs,
 static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *regs,
 					struct exynos_dp_priv *priv)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 	unsigned char lane_stat;
 	unsigned char lt_ctl_val[DP_LANE_CNT_4] = {0, };
 	unsigned int i;
@@ -594,7 +594,7 @@ static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *regs,
 static unsigned int exynos_dp_process_equalizer_training(
 		struct exynos_dp *regs, struct exynos_dp_priv *priv)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 	unsigned char lane_stat, adj_req_sw, adj_req_em, i;
 	unsigned char lt_ctl_val[DP_LANE_CNT_4] = {0,};
 	unsigned char interlane_aligned = 0;
-- 
2.16.2

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

* [U-Boot] [PATCH 1/1] video: exynos: remove redundant assignments
  2018-03-18 13:56 [U-Boot] [PATCH 1/1] video: exynos: remove redundant assignments Heinrich Schuchardt
@ 2018-03-19  6:46 ` Heinrich Schuchardt
  2018-03-19  9:19   ` Anatolij Gustschin
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2018-03-19  6:46 UTC (permalink / raw)
  To: u-boot

No need to initialize variables if the next usage is an assignment.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
v2
	add missing semicolon
---
 drivers/video/exynos/exynos_dp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index 30e4020686..2f724ee745 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -321,7 +321,7 @@ static unsigned int exynos_dp_link_start(struct exynos_dp *regs,
 
 static unsigned int exynos_dp_training_pattern_dis(struct exynos_dp *regs)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 
 	exynos_dp_set_training_pattern(regs, DP_NONE);
 
@@ -339,7 +339,7 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode(
 		struct exynos_dp *regs, unsigned char enable)
 {
 	unsigned char data;
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 
 	ret = exynos_dp_read_byte_from_dpcd(regs, DPCD_LANE_COUNT_SET,
 					    &data);
@@ -366,7 +366,7 @@ static unsigned int exynos_dp_enable_rx_to_enhanced_mode(
 static unsigned int exynos_dp_set_enhanced_mode(struct exynos_dp *regs,
 						unsigned char enhance_mode)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 
 	ret = exynos_dp_enable_rx_to_enhanced_mode(regs, enhance_mode);
 	if (ret != EXYNOS_DP_SUCCESS) {
@@ -416,7 +416,7 @@ static int exynos_dp_read_dpcd_lane_stat(struct exynos_dp *regs,
 static unsigned int exynos_dp_read_dpcd_adj_req(struct exynos_dp *regs,
 		unsigned char lane_num, unsigned char *sw, unsigned char *em)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 	unsigned char buf;
 	unsigned int dpcd_addr;
 	unsigned char shift_val[DP_LANE_CNT_4] = {0, 4, 0, 4};
@@ -484,7 +484,7 @@ static int exynos_dp_reduce_link_rate(struct exynos_dp *regs,
 static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *regs,
 					struct exynos_dp_priv *priv)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 	unsigned char lane_stat;
 	unsigned char lt_ctl_val[DP_LANE_CNT_4] = {0, };
 	unsigned int i;
@@ -594,7 +594,7 @@ static unsigned int exynos_dp_process_clock_recovery(struct exynos_dp *regs,
 static unsigned int exynos_dp_process_equalizer_training(
 		struct exynos_dp *regs, struct exynos_dp_priv *priv)
 {
-	unsigned int ret = EXYNOS_DP_SUCCESS;
+	unsigned int ret;
 	unsigned char lane_stat, adj_req_sw, adj_req_em, i;
 	unsigned char lt_ctl_val[DP_LANE_CNT_4] = {0,};
 	unsigned char interlane_aligned = 0;
-- 
2.16.2

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

* [U-Boot] [PATCH 1/1] video: exynos: remove redundant assignments
  2018-03-19  6:46 ` Heinrich Schuchardt
@ 2018-03-19  9:19   ` Anatolij Gustschin
  0 siblings, 0 replies; 3+ messages in thread
From: Anatolij Gustschin @ 2018-03-19  9:19 UTC (permalink / raw)
  To: u-boot

On Mon, 19 Mar 2018 07:46:08 +0100
Heinrich Schuchardt xypron.glpk at gmx.de wrote:

> No need to initialize variables if the next usage is an assignment.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> v2
> 	add missing semicolon
> ---
>  drivers/video/exynos/exynos_dp.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

Applied to u-boot-video/master, thanks!

--
Anatolij

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

end of thread, other threads:[~2018-03-19  9:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-18 13:56 [U-Boot] [PATCH 1/1] video: exynos: remove redundant assignments Heinrich Schuchardt
2018-03-19  6:46 ` Heinrich Schuchardt
2018-03-19  9:19   ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox