@@ -142,6 +142,7 @@ int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)
142
142
pr = per_cpu (processors , cpu );
143
143
if (!pr || !pr -> performance || !pr -> performance -> state_count )
144
144
return - ENODEV ;
145
+
145
146
* limit = pr -> performance -> states [pr -> performance_platform_limit ].
146
147
core_frequency * 1000 ;
147
148
return 0 ;
@@ -201,8 +202,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
201
202
}
202
203
203
204
pct = (union acpi_object * )buffer .pointer ;
204
- if (!pct || (pct -> type != ACPI_TYPE_PACKAGE )
205
- || (pct -> package .count != 2 )) {
205
+ if (!pct || (pct -> type != ACPI_TYPE_PACKAGE ) || (pct -> package .count != 2 )) {
206
206
pr_err ("Invalid _PCT data\n" );
207
207
result = - EFAULT ;
208
208
goto end ;
@@ -214,9 +214,9 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
214
214
215
215
obj = pct -> package .elements [0 ];
216
216
217
- if ((obj .type != ACPI_TYPE_BUFFER )
218
- || (obj .buffer .length < sizeof (struct acpi_pct_register ))
219
- || (obj .buffer .pointer == NULL )) {
217
+ if ((obj .type != ACPI_TYPE_BUFFER ) ||
218
+ (obj .buffer .length < sizeof (struct acpi_pct_register )) ||
219
+ (obj .buffer .pointer == NULL )) {
220
220
pr_err ("Invalid _PCT data (control_register)\n" );
221
221
result = - EFAULT ;
222
222
goto end ;
@@ -230,9 +230,9 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
230
230
231
231
obj = pct -> package .elements [1 ];
232
232
233
- if ((obj .type != ACPI_TYPE_BUFFER )
234
- || (obj .buffer .length < sizeof (struct acpi_pct_register ))
235
- || (obj .buffer .pointer == NULL )) {
233
+ if ((obj .type != ACPI_TYPE_BUFFER ) ||
234
+ (obj .buffer .length < sizeof (struct acpi_pct_register )) ||
235
+ (obj .buffer .pointer == NULL )) {
236
236
pr_err ("Invalid _PCT data (status_register)\n" );
237
237
result = - EFAULT ;
238
238
goto end ;
@@ -260,8 +260,8 @@ static void amd_fixup_frequency(struct acpi_processor_px *px, int i)
260
260
if (boot_cpu_data .x86_vendor != X86_VENDOR_AMD )
261
261
return ;
262
262
263
- if ((boot_cpu_data .x86 == 0x10 && boot_cpu_data .x86_model < 10 )
264
- || boot_cpu_data .x86 == 0x11 ) {
263
+ if ((boot_cpu_data .x86 == 0x10 && boot_cpu_data .x86_model < 10 ) ||
264
+ boot_cpu_data .x86 == 0x11 ) {
265
265
rdmsr (MSR_AMD_PSTATE_DEF_BASE + index , lo , hi );
266
266
/*
267
267
* MSR C001_0064+:
@@ -353,8 +353,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
353
353
* Check that ACPI's u64 MHz will be valid as u32 KHz in cpufreq
354
354
*/
355
355
if (!px -> core_frequency ||
356
- ((u32 )(px -> core_frequency * 1000 ) !=
357
- (px -> core_frequency * 1000 ))) {
356
+ ((u32 )(px -> core_frequency * 1000 ) != (px -> core_frequency * 1000 ))) {
358
357
pr_err (FW_BUG
359
358
"Invalid BIOS _PSS frequency found for processor %d: 0x%llx MHz\n" ,
360
359
pr -> id , px -> core_frequency );
@@ -499,7 +498,6 @@ int acpi_processor_notify_smm(struct module *calling_module)
499
498
500
499
return 0 ;
501
500
}
502
-
503
501
EXPORT_SYMBOL (acpi_processor_notify_smm );
504
502
505
503
int acpi_processor_get_psd (acpi_handle handle , struct acpi_psd_package * pdomain )
@@ -532,8 +530,7 @@ int acpi_processor_get_psd(acpi_handle handle, struct acpi_psd_package *pdomain)
532
530
state .length = sizeof (struct acpi_psd_package );
533
531
state .pointer = pdomain ;
534
532
535
- status = acpi_extract_package (& (psd -> package .elements [0 ]),
536
- & format , & state );
533
+ status = acpi_extract_package (& (psd -> package .elements [0 ]), & format , & state );
537
534
if (ACPI_FAILURE (status )) {
538
535
pr_err ("Invalid _PSD data\n" );
539
536
result = - EFAULT ;
@@ -716,9 +713,8 @@ int acpi_processor_preregister_performance(
716
713
}
717
714
EXPORT_SYMBOL (acpi_processor_preregister_performance );
718
715
719
- int
720
- acpi_processor_register_performance (struct acpi_processor_performance
721
- * performance , unsigned int cpu )
716
+ int acpi_processor_register_performance (struct acpi_processor_performance
717
+ * performance , unsigned int cpu )
722
718
{
723
719
struct acpi_processor * pr ;
724
720
@@ -751,7 +747,6 @@ acpi_processor_register_performance(struct acpi_processor_performance
751
747
mutex_unlock (& performance_mutex );
752
748
return 0 ;
753
749
}
754
-
755
750
EXPORT_SYMBOL (acpi_processor_register_performance );
756
751
757
752
void acpi_processor_unregister_performance (unsigned int cpu )
@@ -768,11 +763,11 @@ void acpi_processor_unregister_performance(unsigned int cpu)
768
763
769
764
if (pr -> performance )
770
765
kfree (pr -> performance -> states );
766
+
771
767
pr -> performance = NULL ;
772
768
773
769
mutex_unlock (& performance_mutex );
774
770
775
771
return ;
776
772
}
777
-
778
773
EXPORT_SYMBOL (acpi_processor_unregister_performance );
0 commit comments