[thermal:,thermal/next] thermal/drivers/ti-soc-thermal/bandgap Remove unused variable 'val'

Message ID 161955267138.29796.3566387171712555298.tip-bot2@tip-bot2
State New
Headers show
  • [thermal:,thermal/next] thermal/drivers/ti-soc-thermal/bandgap Remove unused variable 'val'
Related show

Commit Message

tip-bot2 for Thomas Gleixner April 27, 2021, 7:44 p.m.
The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     d473327f8f53418691cb2944a45da3e9ea51f9bf
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//d473327f8f53418691cb2944a45da3e9ea51f9bf
Author:        Lin Ruizhe <linruizhe@huawei.com>
AuthorDate:    Wed, 21 Apr 2021 16:42:56 +08:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Wed, 21 Apr 2021 13:37:18 +02:00

thermal/drivers/ti-soc-thermal/bandgap Remove unused variable 'val'

The function ti_bandgap_restore_ctxt() restores the context at resume
time. It checks if the sensor has a counter, reads the register but
does nothing with the value.

The block was probably omitted by the commit b87ea759a4cc.

Remove the unused variable as well as the block using it as we can
consider it as dead code.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: b87ea759a4cc ("staging: omap-thermal: fix context restore function")
Signed-off-by: Lin Ruizhe <linruizhe@huawei.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210421084256.57591-1-linruizhe@huawei.com
 drivers/thermal/ti-soc-thermal/ti-bandgap.c | 4 ----
 1 file changed, 4 deletions(-)


diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index 008fbed..ebe7cb7 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -1142,14 +1142,10 @@  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;
-			val = ti_bandgap_readl(bgp, tsr->bgap_counter);
 			ti_bandgap_writel(bgp, rval->tshut_threshold,