The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/2] selftests/cpufreq: Remove unused local variables from switch_show_governor()
@ 2026-07-06 14:38 Jinseok Kim
  2026-07-06 14:38 ` [PATCH 2/2] selftests/cpufreq: Remove unnecessary sudo from quick_shuffle() Jinseok Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Jinseok Kim @ 2026-07-06 14:38 UTC (permalink / raw)
  To: rafael, viresh.kumar, shuah; +Cc: linux-pm, linux-kselftest, linux-kernel

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@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-06 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 14:38 [PATCH 1/2] selftests/cpufreq: Remove unused local variables from switch_show_governor() Jinseok Kim
2026-07-06 14:38 ` [PATCH 2/2] selftests/cpufreq: Remove unnecessary sudo from quick_shuffle() Jinseok Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox