From: Alex Chiang Date: Mon, 22 Feb 2010 19:11:44 +0000 (-0700) Subject: ACPI: processor: refactor internal map_lapic_id() X-Git-Tag: firefly_0821_release~9833^2~2580^2^7~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=11130736c99c37e253f45b2d3fd30b07313f83c6;p=firefly-linux-kernel-4.4.55.git ACPI: processor: refactor internal map_lapic_id() Untangle the if() statement a little for readability. Acked-by: Venkatesh Pallipadi Signed-off-by: Alex Chiang Signed-off-by: Len Brown --- 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,