Skip to content

Commit 205cb21

Browse files
dhananjay-AMDsuperm1
authored andcommitted
cpufreq/amd-pstate: Remove the redundant verify() function
Merge the two verify() callback functions and rename the cpufreq_policy_data argument for better readability. Signed-off-by: Dhananjay Ugwekar <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Reviewed-by: Gautham R. Shenoy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mario Limonciello <[email protected]>
1 parent 5082397 commit 205cb21

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,10 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf,
527527
cpufreq_cpu_put(policy);
528528
}
529529

530-
static int amd_pstate_verify(struct cpufreq_policy_data *policy)
530+
static int amd_pstate_verify(struct cpufreq_policy_data *policy_data)
531531
{
532-
cpufreq_verify_within_cpu_limits(policy);
533-
532+
cpufreq_verify_within_cpu_limits(policy_data);
533+
pr_debug("policy_max =%d, policy_min=%d\n", policy_data->max, policy_data->min);
534534
return 0;
535535
}
536536

@@ -1638,13 +1638,6 @@ static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
16381638
return 0;
16391639
}
16401640

1641-
static int amd_pstate_epp_verify_policy(struct cpufreq_policy_data *policy)
1642-
{
1643-
cpufreq_verify_within_cpu_limits(policy);
1644-
pr_debug("policy_max =%d, policy_min=%d\n", policy->max, policy->min);
1645-
return 0;
1646-
}
1647-
16481641
static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)
16491642
{
16501643
struct amd_cpudata *cpudata = policy->driver_data;
@@ -1700,7 +1693,7 @@ static struct cpufreq_driver amd_pstate_driver = {
17001693

17011694
static struct cpufreq_driver amd_pstate_epp_driver = {
17021695
.flags = CPUFREQ_CONST_LOOPS,
1703-
.verify = amd_pstate_epp_verify_policy,
1696+
.verify = amd_pstate_verify,
17041697
.setpolicy = amd_pstate_epp_set_policy,
17051698
.init = amd_pstate_epp_cpu_init,
17061699
.exit = amd_pstate_epp_cpu_exit,

0 commit comments

Comments
 (0)