selftests/cpufreq: Remove unused local variables from switch_show_governor()

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>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://patch.msgid.link/20260706143857.3306-1-always.starving0@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Jinseok Kim 2026-07-06 23:38:53 +09:00 committed by Rafael J. Wysocki
parent 1590cf0329
commit c7aa1af7b3

View File

@ -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