x86/PCI: Use NUMA_NO_NODE, not -1, for unknown node
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 24 Jan 2014 21:51:49 +0000 (14:51 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 3 Feb 2014 17:38:57 +0000 (10:38 -0700)
NUMA_NO_NODE is the usual value for "we don't know what node this is on,"
e.g., it is the error return from acpi_get_node().  This changes uses of -1
to NUMA_NO_NODE.  NUMA_NO_NODE is #defined to be -1 already, so this is not
a functional change.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/x86/pci/acpi.c

index 78f27efa11e17d656cd4d63b4b8741883a824282..6304ea0f426dad5ce8acb0152e63bdfbaa889470 100644 (file)
@@ -494,17 +494,17 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
                return NULL;
        }
 
-       node = -1;
+       node = NUMA_NO_NODE;
 #ifdef CONFIG_ACPI_NUMA
        pxm = acpi_get_pxm(device->handle);
        if (pxm >= 0)
                node = pxm_to_node(pxm);
 #endif
-       if (node == -1)
+       if (node == NUMA_NO_NODE)
                node = x86_pci_root_bus_node(busnum);
 
-       if (node != -1 && !node_online(node))
-               node = -1;
+       if (node != NUMA_NO_NODE && !node_online(node))
+               node = NUMA_NO_NODE;
 
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (!info) {
@@ -570,7 +570,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
                        pcie_bus_configure_settings(child);
        }
 
-       if (bus && node != -1) {
+       if (bus && node != NUMA_NO_NODE) {
 #ifdef CONFIG_ACPI_NUMA
                if (pxm >= 0)
                        dev_printk(KERN_DEBUG, &bus->dev,
This page took 0.03757 seconds and 5 git commands to generate.