Message ID | 13699686.uLZWGnKmhe@rjwysocki.net |
---|---|
State | New |
Headers | show |
Series | cpuidle: menu: Avoid discarding useful information when processing recent idle intervals | expand |
--- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c @@ -117,7 +117,7 @@ static unsigned int get_typical_interval(struct menu_device *data) { int i, divisor; - unsigned int min, max, thresh, avg; + unsigned int max, thresh, avg; uint64_t sum, variance; thresh = INT_MAX; /* Discard outliers above this value */ @@ -125,7 +125,6 @@ again: /* First calculate the average of past intervals */ - min = UINT_MAX; max = 0; sum = 0; divisor = 0; @@ -136,9 +135,6 @@ divisor++; if (value > max) max = value; - - if (value < min) - min = value; } }