Skip to contentSkip to conversation

thermal: ti-soc-thermal: remove useless variable

PATCH New Jiapeng Chong 1 participant 1 message Apr 12, 2021

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

PATCH 1/1 thermal: ti-soc-thermal: remove useless variable

Fix the following gcc warning:

drivers/thermal/ti-soc-thermal/ti-bandgap.c:1146:7: warning: variable ‘val’ set but not used [-Wunused-but-set-variable].

---
 drivers/thermal/ti-soc-thermal/ti-bandgap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/thermal/ti-soc-thermal/ti-bandgap.c +1 -2
index 8a3646e..2df0e09 100644
@@ -1143,13 +1143,12 @@ static int ti_bandgap_restore_ctxt(struct ti_bandgap *bgp)
 	for (i = 0; i < bgp->conf->sensor_count; i++) {
 		struct temp_sensor_registers *tsr;
 		struct temp_sensor_regval *rval;
-		u32 val = 0;
 
 		rval = &bgp->regval[i];
 		tsr = bgp->conf->sensors[i].registers;
 
 		if (TI_BANDGAP_HAS(bgp, COUNTER))
-			val = ti_bandgap_readl(bgp, tsr->bgap_counter);
+			ti_bandgap_readl(bgp, tsr->bgap_counter);
 
 		if (TI_BANDGAP_HAS(bgp, TSHUT_CONFIG))
 			ti_bandgap_writel(bgp, rval->tshut_threshold,
Signature · 1 line
1.8.3.1