[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140129181918.15476.38407.stgit@bhelgaas-glaptop.roam.corp.google.com>
Date: Wed, 29 Jan 2014 11:19:18 -0700
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: linux-pci@...r.kernel.org
Cc: linux-acpi@...r.kernel.org, x86@...nel.org,
linux-ia64@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 15/17] ACPI / numa: Simplify acpi_get_node() style
Simplify control flow by removing local variable initialization and
returning a constant as soon as possible. No functional change.
Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
---
drivers/acpi/numa.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index dab7dac6b1a8..a7e779bfa2f6 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -333,12 +333,12 @@ int acpi_get_pxm(acpi_handle h)
int acpi_get_node(acpi_handle handle)
{
- int pxm, node = NUMA_NO_NODE;
+ int pxm;
pxm = acpi_get_pxm(handle);
- if (pxm >= 0 && pxm < MAX_PXM_DOMAINS)
- node = acpi_map_pxm_to_node(pxm);
+ if (pxm < 0 || pxm >= MAX_PXM_DOMAINS)
+ return NUMA_NO_NODE;
- return node;
+ return acpi_map_pxm_to_node(pxm);
}
EXPORT_SYMBOL(acpi_get_node);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists