Skip to content

Commit 4264e02

Browse files
Xin Haovireshk
authored andcommitted
cpufreq: CPPC: Reuse caps variable in few routines
The 'caps' variable has been defined in cppc_cpufreq_khz_to_perf() and cppc_cpufreq_perf_to_khz() routines, so there is no need to get 'highest_perf' value through 'cpu->caps.highest_perf', we can use 'caps->highest_perf' instead. Signed-off-by: Xin Hao <[email protected]> [ Viresh: Updated commit log ] Signed-off-by: Viresh Kumar <[email protected]>
1 parent 8c37ad2 commit 4264e02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cpufreq/cppc_cpufreq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static unsigned int cppc_cpufreq_perf_to_khz(struct cppc_cpudata *cpu,
115115
if (!max_khz)
116116
max_khz = cppc_get_dmi_max_khz();
117117
mul = max_khz;
118-
div = cpu->perf_caps.highest_perf;
118+
div = caps->highest_perf;
119119
}
120120
return (u64)perf * mul / div;
121121
}
@@ -138,7 +138,7 @@ static unsigned int cppc_cpufreq_khz_to_perf(struct cppc_cpudata *cpu,
138138
} else {
139139
if (!max_khz)
140140
max_khz = cppc_get_dmi_max_khz();
141-
mul = cpu->perf_caps.highest_perf;
141+
mul = caps->highest_perf;
142142
div = max_khz;
143143
}
144144

0 commit comments

Comments
 (0)