[PATCH 1/2] selftests/cpufreq: Remove unused local variables from switch_show_governor()
From: Jinseok Kim
Date: Mon Jul 06 2026 - 11:55:31 EST
switch_show_governor() assigns the current governor and frequency
to local variables before switching governors.
However, these variables are never referenced afterwards. The function
does not restore the previous governor or use the saved frequency, as
backup_governor() and restore_governor() already handle state preservation
elsewhere.
Signed-off-by: Jinseok Kim <always.starving0@xxxxxxxxx>
---
tools/testing/selftests/cpufreq/governor.sh | 5 -----
1 file changed, 5 deletions(-)
diff --git a/tools/testing/selftests/cpufreq/governor.sh b/tools/testing/selftests/cpufreq/governor.sh
index fe37df79c087..212ef1cf43d5 100755
--- a/tools/testing/selftests/cpufreq/governor.sh
+++ b/tools/testing/selftests/cpufreq/governor.sh
@@ -100,11 +100,6 @@ switch_governor()
# $1: policy, $2: governor
switch_show_governor()
{
- cur_gov=find_current_governor
- if [ $cur_gov == "userspace" ]; then
- cur_freq=find_current_freq
- fi
-
# switch governor
__switch_governor $1 $2
--
2.43.0