Skip to contentSkip to conversation

Input: tps6507x-ts: remove variable loops

PATCH Applied Colin Ian King 3 participants 3 messages Oct 20, 2022 – Oct 24, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: tps6507x-ts: remove variable loops

The variable loops is being incremented but is never referenced, it is redundant and can be removed.

---
 drivers/input/touchscreen/tps6507x-ts.c | 2 --
 1 file changed, 2 deletions(-)
drivers/input/touchscreen/tps6507x-ts.c +0 -2
index 357a3108f2e5..f48871767763 100644
@@ -119,7 +119,6 @@ static s32 tps6507x_adc_conversion(struct tps6507x_ts *tsc,
 static s32 tps6507x_adc_standby(struct tps6507x_ts *tsc)
 {
 	s32 ret;
-	s32 loops = 0;
 	u8 val;
 
 	ret = tps6507x_write_u8(tsc,  TPS6507X_REG_ADCONFIG,
@@ -141,7 +140,6 @@ static s32 tps6507x_adc_standby(struct tps6507x_ts *tsc)
 		ret = tps6507x_read_u8(tsc, TPS6507X_REG_INT, &val);
 		if (ret)
 			return ret;
-		loops++;
 	}
 
 	return ret;
Signature · 1 line
2.37.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Colin Ian King

The variable loops is being incremented but is never referenced, it is redundant and can be removed.

Quoted 26 lines
---
 drivers/input/touchscreen/tps6507x-ts.c | 2 --
 1 file changed, 2 deletions(-)
drivers/input/touchscreen/tps6507x-ts.c +0 -2
index 357a3108f2e5..f48871767763 100644
@@ -119,7 +119,6 @@ static s32 tps6507x_adc_conversion(struct tps6507x_ts *tsc,
 static s32 tps6507x_adc_standby(struct tps6507x_ts *tsc)
 {
 	s32 ret;
-	s32 loops = 0;
 	u8 val;
 
 	ret = tps6507x_write_u8(tsc,  TPS6507X_REG_ADCONFIG,
@@ -141,7 +140,6 @@ static s32 tps6507x_adc_standby(struct tps6507x_ts *tsc)
 		ret = tps6507x_read_u8(tsc, TPS6507X_REG_INT, &val);
 		if (ret)
 			return ret;
-		loops++;
 	}
 
 	return ret;
Signature · 1 line
2.37.3