Skip to content

Commit

Permalink
Merge back earlier core cpufreq material for 6.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael J. Wysocki committed Apr 8, 2024
2 parents 8c55654 + db9ea3b commit 5196123
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/cpufreq/freq_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy_data *policy,
struct cpufreq_frequency_table *table)
{
struct cpufreq_frequency_table *pos;
unsigned int freq, next_larger = ~0;
unsigned int freq, prev_smaller = 0;
bool found = false;

pr_debug("request for verification of policy (%u - %u kHz) for cpu %u\n",
Expand All @@ -86,12 +86,12 @@ int cpufreq_frequency_table_verify(struct cpufreq_policy_data *policy,
break;
}

if ((next_larger > freq) && (freq > policy->max))
next_larger = freq;
if ((prev_smaller < freq) && (freq <= policy->max))
prev_smaller = freq;
}

if (!found) {
policy->max = next_larger;
policy->max = prev_smaller;
cpufreq_verify_within_cpu_limits(policy);
}

Expand Down

0 comments on commit 5196123

Please sign in to comment.