From: Rafael J. Wysocki Date: Thu, 6 Feb 2025 14:22:59 +0000 (+0100) Subject: cpuidle: menu: Drop a redundant local variable X-Git-Tag: v6.15-rc1~191^2~3^2~1^2~1^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2cd195b57cf5ffbe432be01e96f35637e7bd403;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Christian Loehle Tested-by: Artem Bityutskiy Tested-by: Christian Loehle Tested-by: Aboorva Devarajan Link: https://patch.msgid.link/13699686.uLZWGnKmhe@rjwysocki.net --- diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index 28363bfa3e4c9..b19406502b569 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c @@ -117,7 +117,7 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev); 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 @@ static unsigned int get_typical_interval(struct menu_device *data) again: /* First calculate the average of past intervals */ - min = UINT_MAX; max = 0; sum = 0; divisor = 0; @@ -136,9 +135,6 @@ again: divisor++; if (value > max) max = value; - - if (value < min) - min = value; } }