mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 22:22:08 +02:00
cpufreq: Remove duplicate check in __cpufreq_offline()
The has_target() checks in __cpufreq_offline() are duplicate. Remove one of them and put the operations of exiting governor together with storing last governor's name. Signed-off-by: Lifeng Zheng <zhenglifeng1@huawei.com> Link: https://patch.msgid.link/20250623133402.3120230-5-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
2e554cfa25
commit
5d6ecaaa92
|
|
@ -1691,14 +1691,13 @@ static void __cpufreq_offline(unsigned int cpu, struct cpufreq_policy *policy)
|
|||
return;
|
||||
}
|
||||
|
||||
if (has_target())
|
||||
if (has_target()) {
|
||||
strscpy(policy->last_governor, policy->governor->name,
|
||||
CPUFREQ_NAME_LEN);
|
||||
else
|
||||
policy->last_policy = policy->policy;
|
||||
|
||||
if (has_target())
|
||||
cpufreq_exit_governor(policy);
|
||||
} else {
|
||||
policy->last_policy = policy->policy;
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform the ->offline() during light-weight tear-down, as
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user