Skip to content

Commit d2cd195

Browse files
committed
cpuidle: menu: Drop a redundant local variable
Local variable min in get_typical_interval() is updated, but never accessed later, so drop it. No functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Christian Loehle <[email protected]> Tested-by: Artem Bityutskiy <[email protected]> Tested-by: Christian Loehle <[email protected]> Tested-by: Aboorva Devarajan <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 16c8d75 commit d2cd195

File tree

1 file changed

+1
-5
lines changed
  • drivers/cpuidle/governors

1 file changed

+1
-5
lines changed

drivers/cpuidle/governors/menu.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,14 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev);
117117
static unsigned int get_typical_interval(struct menu_device *data)
118118
{
119119
int i, divisor;
120-
unsigned int min, max, thresh, avg;
120+
unsigned int max, thresh, avg;
121121
uint64_t sum, variance;
122122

123123
thresh = INT_MAX; /* Discard outliers above this value */
124124

125125
again:
126126

127127
/* First calculate the average of past intervals */
128-
min = UINT_MAX;
129128
max = 0;
130129
sum = 0;
131130
divisor = 0;
@@ -136,9 +135,6 @@ static unsigned int get_typical_interval(struct menu_device *data)
136135
divisor++;
137136
if (value > max)
138137
max = value;
139-
140-
if (value < min)
141-
min = value;
142138
}
143139
}
144140

0 commit comments

Comments
 (0)