projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8191fa
)
ACPI: processor: refactor internal map_lapic_id()
author
Alex Chiang
<
[email protected]
>
Mon, 22 Feb 2010 19:11:44 +0000
(12:11 -0700)
committer
Len Brown
<
[email protected]
>
Mon, 15 Mar 2010 01:17:23 +0000
(21:17 -0400)
Untangle the if() statement a little for readability.
Acked-by: Venkatesh Pallipadi <
[email protected]
>
Signed-off-by: Alex Chiang <
[email protected]
>
Signed-off-by: Len Brown <
[email protected]
>
drivers/acpi/processor_core.c
patch
|
blob
|
history
diff --git
a/drivers/acpi/processor_core.c
b/drivers/acpi/processor_core.c
index 626c75479868eb395e02b32bce7262f2fb60b313..9eeda9e437eaa2eb1e5422286cfcd70fd16a43d5 100644
(file)
--- 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,