diff options
author | Hanjun Guo <hanjun.guo@linaro.org> | 2015-05-11 06:17:16 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-05-13 23:28:15 +0200 |
commit | 05eb3cd8b4f2dc5b694bd17b20df5b6aa4ffdae3 (patch) | |
tree | b9e35a05b0593736c9542a73e638d0692a4445cd /drivers/acpi/acpi_processor.c | |
parent | Xen / ACPI / processor: Remove unneeded NULL check (diff) | |
download | linux-05eb3cd8b4f2dc5b694bd17b20df5b6aa4ffdae3.tar.xz linux-05eb3cd8b4f2dc5b694bd17b20df5b6aa4ffdae3.zip |
ACPI / processor: remove cpu_index in acpi_processor_get_info()
Just use pr->id instead of cpu_index to simplify the code.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_processor.c')
-rw-r--r-- | drivers/acpi/acpi_processor.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index ac6bda030a74..0676b5059d75 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -216,7 +216,7 @@ static int acpi_processor_get_info(struct acpi_device *device) struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; struct acpi_processor *pr = acpi_driver_data(device); phys_cpuid_t phys_id; - int cpu_index, device_declaration = 0; + int device_declaration = 0; acpi_status status = AE_OK; static int cpu0_initialized; unsigned long long value; @@ -268,18 +268,16 @@ static int acpi_processor_get_info(struct acpi_device *device) acpi_handle_debug(pr->handle, "failed to get CPU physical ID.\n"); pr->phys_id = phys_id; - cpu_index = acpi_map_cpuid(pr->phys_id, pr->acpi_id); + pr->id = acpi_map_cpuid(pr->phys_id, pr->acpi_id); if (!cpu0_initialized && !acpi_has_cpu_in_madt()) { cpu0_initialized = 1; /* * Handle UP system running SMP kernel, with no CPU * entry in MADT */ - if (invalid_logical_cpuid(cpu_index) - && (num_online_cpus() == 1)) - cpu_index = 0; + if (invalid_logical_cpuid(pr->id) && (num_online_cpus() == 1)) + pr->id = 0; } - pr->id = cpu_index; /* * Extra Processor objects may be enumerated on MP systems with |