Skip to contentSkip to conversation

input: ti_am335x_tsc: remove redundant assignment to variable config

PATCH Applied Colin Ian King 2 participants 2 messages Feb 5, 2024 – Feb 9, 2024

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

PATCH 1/1 input: ti_am335x_tsc: remove redundant assignment to variable config

The variable config is being initialized with a value that is never read, it is being re-assigned in the next statement. The initialization is redundant and can be removed.

Cleans up clang scan build warning:
drivers/input/touchscreen/ti_am335x_tsc.c:160:2: warning: Value stored to 'config' is never read [deadcode.DeadStores]

---
 drivers/input/touchscreen/ti_am335x_tsc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/input/touchscreen/ti_am335x_tsc.c +0 -1
index 34324f8512ac..294b7ceded27 100644
@@ -157,7 +157,6 @@ static void titsc_step_config(struct titsc *ts_dev)
 			     n++ == 0 ? STEPCONFIG_OPENDLY : 0);
 	}
 
-	config = 0;
 	config = STEPCONFIG_MODE_HWSYNC |
 			STEPCONFIG_AVG_16 | ts_dev->bit_yn |
 			STEPCONFIG_INM_ADCREFM;
Signature · 1 line
2.39.2
maintainer Applied
#1 lore raw
Quoted 9 lines · Colin Ian King

The variable config is being initialized with a value that is never read, it is being re-assigned in the next statement. The initialization is redundant and can be removed.

Cleans up clang scan build warning:
drivers/input/touchscreen/ti_am335x_tsc.c:160:2: warning: Value stored to 'config' is never read [deadcode.DeadStores]

Applied, thank you.

Signature · 1 line
Dmitry