Fix unused-but-set-variable build breakage clang migrate to r433403
Bug: 201034056
Signed-off-by: Robin Peng <[email protected]>
Change-Id: I1760e2b99262a2068e5cb0a815f3d9956521076c
diff --git a/max1720x_battery.c b/max1720x_battery.c
index 26cede6..af223f7 100644
--- a/max1720x_battery.c
+++ b/max1720x_battery.c
@@ -1272,7 +1272,7 @@
static void max1720x_handle_update_nconvgcfg(struct max1720x_chip *chip,
int temp)
{
- int idx = -1, hysteresis_temp;
+ int idx = -1;
if (chip->temp_convgcfg == NULL)
return;
@@ -1292,8 +1292,6 @@
/* We want to switch to higher slot only if above temp + hysteresis
* but when temperature drops, we want to change at the level
*/
- hysteresis_temp = chip->temp_convgcfg[chip->curr_convgcfg_idx] +
- chip->convgcfg_hysteresis;
if ((idx != chip->curr_convgcfg_idx) &&
(chip->curr_convgcfg_idx == -1 || idx < chip->curr_convgcfg_idx ||
temp >= chip->temp_convgcfg[chip->curr_convgcfg_idx] +