diff options
author | Alex Chiang <achiang@hp.com> | 2010-02-22 12:11:44 -0700 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-03-14 21:17:23 -0400 |
commit | 11130736c99c37e253f45b2d3fd30b07313f83c6 (patch) | |
tree | 1fd6a091ac6a6105e7e7619b1faf6cabebba7bc2 /drivers/acpi/processor_core.c | |
parent | d8191fa4a33fdc817277da4f2b7f771ff605a41c (diff) | |
download | linux-11130736c99c37e253f45b2d3fd30b07313f83c6.tar.gz linux-11130736c99c37e253f45b2d3fd30b07313f83c6.tar.bz2 linux-11130736c99c37e253f45b2d3fd30b07313f83c6.zip |
ACPI: processor: refactor internal map_lapic_id()
Untangle the if() statement a little for readability.
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/processor_core.c')
-rw-r--r-- | drivers/acpi/processor_core.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 626c75479868..9eeda9e437ea 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c @@ -50,12 +50,15 @@ static int map_lapic_id(struct acpi_subtable_header *entry, { struct acpi_madt_local_apic *lapic = (struct acpi_madt_local_apic *)entry; - if ((lapic->lapic_flags & ACPI_MADT_ENABLED) && - lapic->processor_id == acpi_id) { - *apic_id = lapic->id; - return 1; - } - return 0; + + if (!(lapic->lapic_flags & ACPI_MADT_ENABLED)) + return 0; + + if (lapic->processor_id != acpi_id) + return 0; + + *apic_id = lapic->id; + return 1; } static int map_x2apic_id(struct acpi_subtable_header *entry, |