提交 962fe9c9 编写于 作者: B Bjorn Helgaas

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: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 486c79b5
......@@ -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);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册