Commit 3d9e9a96 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

ACPI: processor: perflib: Adjust white space

Some inconsistent usage of white space in the ACPI processor performance
library code causes that code to be somewhat harder to read that it
would have been otherwise, so adjust the white space in there to
address that.

No expected functional impact.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b697b812
...@@ -142,6 +142,7 @@ int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) ...@@ -142,6 +142,7 @@ int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)
pr = per_cpu(processors, cpu); pr = per_cpu(processors, cpu);
if (!pr || !pr->performance || !pr->performance->state_count) if (!pr || !pr->performance || !pr->performance->state_count)
return -ENODEV; return -ENODEV;
*limit = pr->performance->states[pr->performance_platform_limit]. *limit = pr->performance->states[pr->performance_platform_limit].
core_frequency * 1000; core_frequency * 1000;
return 0; return 0;
...@@ -201,8 +202,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) ...@@ -201,8 +202,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
} }
pct = (union acpi_object *)buffer.pointer; pct = (union acpi_object *)buffer.pointer;
if (!pct || (pct->type != ACPI_TYPE_PACKAGE) if (!pct || (pct->type != ACPI_TYPE_PACKAGE) || (pct->package.count != 2)) {
|| (pct->package.count != 2)) {
pr_err("Invalid _PCT data\n"); pr_err("Invalid _PCT data\n");
result = -EFAULT; result = -EFAULT;
goto end; goto end;
...@@ -214,9 +214,9 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) ...@@ -214,9 +214,9 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
obj = pct->package.elements[0]; obj = pct->package.elements[0];
if ((obj.type != ACPI_TYPE_BUFFER) if ((obj.type != ACPI_TYPE_BUFFER) ||
|| (obj.buffer.length < sizeof(struct acpi_pct_register)) (obj.buffer.length < sizeof(struct acpi_pct_register)) ||
|| (obj.buffer.pointer == NULL)) { (obj.buffer.pointer == NULL)) {
pr_err("Invalid _PCT data (control_register)\n"); pr_err("Invalid _PCT data (control_register)\n");
result = -EFAULT; result = -EFAULT;
goto end; goto end;
...@@ -230,9 +230,9 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr) ...@@ -230,9 +230,9 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
obj = pct->package.elements[1]; obj = pct->package.elements[1];
if ((obj.type != ACPI_TYPE_BUFFER) if ((obj.type != ACPI_TYPE_BUFFER) ||
|| (obj.buffer.length < sizeof(struct acpi_pct_register)) (obj.buffer.length < sizeof(struct acpi_pct_register)) ||
|| (obj.buffer.pointer == NULL)) { (obj.buffer.pointer == NULL)) {
pr_err("Invalid _PCT data (status_register)\n"); pr_err("Invalid _PCT data (status_register)\n");
result = -EFAULT; result = -EFAULT;
goto end; goto end;
...@@ -260,8 +260,8 @@ static void amd_fixup_frequency(struct acpi_processor_px *px, int i) ...@@ -260,8 +260,8 @@ static void amd_fixup_frequency(struct acpi_processor_px *px, int i)
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
return; return;
if ((boot_cpu_data.x86 == 0x10 && boot_cpu_data.x86_model < 10) if ((boot_cpu_data.x86 == 0x10 && boot_cpu_data.x86_model < 10) ||
|| boot_cpu_data.x86 == 0x11) { boot_cpu_data.x86 == 0x11) {
rdmsr(MSR_AMD_PSTATE_DEF_BASE + index, lo, hi); rdmsr(MSR_AMD_PSTATE_DEF_BASE + index, lo, hi);
/* /*
* MSR C001_0064+: * MSR C001_0064+:
...@@ -353,8 +353,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) ...@@ -353,8 +353,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
* Check that ACPI's u64 MHz will be valid as u32 KHz in cpufreq * Check that ACPI's u64 MHz will be valid as u32 KHz in cpufreq
*/ */
if (!px->core_frequency || if (!px->core_frequency ||
((u32)(px->core_frequency * 1000) != ((u32)(px->core_frequency * 1000) != (px->core_frequency * 1000))) {
(px->core_frequency * 1000))) {
pr_err(FW_BUG pr_err(FW_BUG
"Invalid BIOS _PSS frequency found for processor %d: 0x%llx MHz\n", "Invalid BIOS _PSS frequency found for processor %d: 0x%llx MHz\n",
pr->id, px->core_frequency); pr->id, px->core_frequency);
...@@ -499,7 +498,6 @@ int acpi_processor_notify_smm(struct module *calling_module) ...@@ -499,7 +498,6 @@ int acpi_processor_notify_smm(struct module *calling_module)
return 0; return 0;
} }
EXPORT_SYMBOL(acpi_processor_notify_smm); EXPORT_SYMBOL(acpi_processor_notify_smm);
int acpi_processor_get_psd(acpi_handle handle, struct acpi_psd_package *pdomain) 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,8 +530,7 @@ int acpi_processor_get_psd(acpi_handle handle, struct acpi_psd_package *pdomain)
state.length = sizeof(struct acpi_psd_package); state.length = sizeof(struct acpi_psd_package);
state.pointer = pdomain; state.pointer = pdomain;
status = acpi_extract_package(&(psd->package.elements[0]), status = acpi_extract_package(&(psd->package.elements[0]), &format, &state);
&format, &state);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
pr_err("Invalid _PSD data\n"); pr_err("Invalid _PSD data\n");
result = -EFAULT; result = -EFAULT;
...@@ -716,8 +713,7 @@ int acpi_processor_preregister_performance( ...@@ -716,8 +713,7 @@ int acpi_processor_preregister_performance(
} }
EXPORT_SYMBOL(acpi_processor_preregister_performance); EXPORT_SYMBOL(acpi_processor_preregister_performance);
int int acpi_processor_register_performance(struct acpi_processor_performance
acpi_processor_register_performance(struct acpi_processor_performance
*performance, unsigned int cpu) *performance, unsigned int cpu)
{ {
struct acpi_processor *pr; struct acpi_processor *pr;
...@@ -751,7 +747,6 @@ acpi_processor_register_performance(struct acpi_processor_performance ...@@ -751,7 +747,6 @@ acpi_processor_register_performance(struct acpi_processor_performance
mutex_unlock(&performance_mutex); mutex_unlock(&performance_mutex);
return 0; return 0;
} }
EXPORT_SYMBOL(acpi_processor_register_performance); EXPORT_SYMBOL(acpi_processor_register_performance);
void acpi_processor_unregister_performance(unsigned int cpu) void acpi_processor_unregister_performance(unsigned int cpu)
...@@ -768,11 +763,11 @@ void acpi_processor_unregister_performance(unsigned int cpu) ...@@ -768,11 +763,11 @@ void acpi_processor_unregister_performance(unsigned int cpu)
if (pr->performance) if (pr->performance)
kfree(pr->performance->states); kfree(pr->performance->states);
pr->performance = NULL; pr->performance = NULL;
mutex_unlock(&performance_mutex); mutex_unlock(&performance_mutex);
return; return;
} }
EXPORT_SYMBOL(acpi_processor_unregister_performance); EXPORT_SYMBOL(acpi_processor_unregister_performance);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment