@@ -1179,16 +1179,16 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
11791179 return ret_val ;
11801180}
11811181
1182- static int cppc_get_perf (int cpunum , enum cppc_regs reg_idx , u64 * perf )
1182+ static int cppc_get_reg_val (int cpu , enum cppc_regs reg_idx , u64 * val )
11831183{
1184- struct cpc_desc * cpc_desc = per_cpu (cpc_desc_ptr , cpunum );
1184+ struct cpc_desc * cpc_desc = per_cpu (cpc_desc_ptr , cpu );
11851185 struct cpc_register_resource * reg ;
11861186
1187- if (perf == NULL )
1187+ if (val == NULL )
11881188 return - EINVAL ;
11891189
11901190 if (!cpc_desc ) {
1191- pr_debug ("No CPC descriptor for CPU:%d\n" , cpunum );
1191+ pr_debug ("No CPC descriptor for CPU:%d\n" , cpu );
11921192 return - ENODEV ;
11931193 }
11941194
@@ -1202,7 +1202,7 @@ static int cppc_get_perf(int cpunum, enum cppc_regs reg_idx, u64 *perf)
12021202 }
12031203
12041204 if (CPC_IN_PCC (reg )) {
1205- int pcc_ss_id = per_cpu (cpu_pcc_subspace_idx , cpunum );
1205+ int pcc_ss_id = per_cpu (cpu_pcc_subspace_idx , cpu );
12061206 struct cppc_pcc_data * pcc_ss_data = NULL ;
12071207 int ret ;
12081208
@@ -1216,7 +1216,7 @@ static int cppc_get_perf(int cpunum, enum cppc_regs reg_idx, u64 *perf)
12161216 down_write (& pcc_ss_data -> pcc_lock );
12171217
12181218 if (send_pcc_cmd (pcc_ss_id , CMD_READ ) >= 0 )
1219- ret = cpc_read (cpunum , reg , perf );
1219+ ret = cpc_read (cpu , reg , val );
12201220 else
12211221 ret = - EIO ;
12221222
@@ -1225,7 +1225,7 @@ static int cppc_get_perf(int cpunum, enum cppc_regs reg_idx, u64 *perf)
12251225 return ret ;
12261226 }
12271227
1228- return cpc_read (cpunum , reg , perf );
1228+ return cpc_read (cpu , reg , val );
12291229}
12301230
12311231/**
@@ -1237,7 +1237,7 @@ static int cppc_get_perf(int cpunum, enum cppc_regs reg_idx, u64 *perf)
12371237 */
12381238int cppc_get_desired_perf (int cpunum , u64 * desired_perf )
12391239{
1240- return cppc_get_perf (cpunum , DESIRED_PERF , desired_perf );
1240+ return cppc_get_reg_val (cpunum , DESIRED_PERF , desired_perf );
12411241}
12421242EXPORT_SYMBOL_GPL (cppc_get_desired_perf );
12431243
@@ -1250,7 +1250,7 @@ EXPORT_SYMBOL_GPL(cppc_get_desired_perf);
12501250 */
12511251int cppc_get_nominal_perf (int cpunum , u64 * nominal_perf )
12521252{
1253- return cppc_get_perf (cpunum , NOMINAL_PERF , nominal_perf );
1253+ return cppc_get_reg_val (cpunum , NOMINAL_PERF , nominal_perf );
12541254}
12551255
12561256/**
@@ -1262,7 +1262,7 @@ int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf)
12621262 */
12631263int cppc_get_highest_perf (int cpunum , u64 * highest_perf )
12641264{
1265- return cppc_get_perf (cpunum , HIGHEST_PERF , highest_perf );
1265+ return cppc_get_reg_val (cpunum , HIGHEST_PERF , highest_perf );
12661266}
12671267EXPORT_SYMBOL_GPL (cppc_get_highest_perf );
12681268
@@ -1275,7 +1275,7 @@ EXPORT_SYMBOL_GPL(cppc_get_highest_perf);
12751275 */
12761276int cppc_get_epp_perf (int cpunum , u64 * epp_perf )
12771277{
1278- return cppc_get_perf (cpunum , ENERGY_PERF , epp_perf );
1278+ return cppc_get_reg_val (cpunum , ENERGY_PERF , epp_perf );
12791279}
12801280EXPORT_SYMBOL_GPL (cppc_get_epp_perf );
12811281
0 commit comments