Linux IA64 platform development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org
Cc: linux-acpi@vger.kernel.org, x86@kernel.org,
	linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 10/17] x86/PCI: Use NUMA_NO_NODE, not -1, for unknown node
Date: Wed, 29 Jan 2014 18:18:41 +0000	[thread overview]
Message-ID: <20140129181841.15476.36375.stgit@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20140129174106.15476.7075.stgit@bhelgaas-glaptop.roam.corp.google.com>

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>
---
 arch/x86/pci/acpi.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 78f27efa11e1..6304ea0f426d 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -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,


  parent reply	other threads:[~2014-01-29 18:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 18:17 [PATCH 00/17] x86, ia64 NUMA cleanup Bjorn Helgaas
2014-01-29 18:17 ` [PATCH 01/17] x86/PCI: Drop pcibios_scan_root() check for bus already scanned Bjorn Helgaas
2014-01-29 18:17 ` [PATCH 02/17] x86/PCI: Use pcibios_scan_root() instead of pci_scan_bus_with_sysdata() Bjorn Helgaas
2014-01-29 18:17 ` [PATCH 03/17] x86/PCI: Use pcibios_scan_root() instead of pci_scan_bus_on_node() Bjorn Helgaas
2014-01-29 18:17 ` [PATCH 04/17] x86/PCI: Merge pci_scan_bus_on_node() into pcibios_scan_root() Bjorn Helgaas
2014-01-29 18:18 ` [PATCH 05/17] x86/PCI: Drop return value of pcibios_scan_root() Bjorn Helgaas
2014-01-29 18:18 ` [PATCH 06/17] x86/PCI: Add x86_pci_root_bus_node() to look up NUMA node from PCI bus Bjorn Helgaas
2014-01-29 18:18 ` [PATCH 07/17] x86/PCI: Use x86_pci_root_bus_node() instead of get_mp_bus_to_node() Bjorn Helgaas
2014-01-29 18:18 ` [PATCH 08/17] x86/PCI: Remove mp_bus_to_node[], set_mp_bus_to_node(), get_mp_bus_to_node() Bjorn Helgaas
2014-01-29 18:18 ` [PATCH 09/17] x86/PCI: Remove unnecessary list_empty(&pci_root_infos) check Bjorn Helgaas
2014-01-29 18:18 ` Bjorn Helgaas [this message]
2014-01-29 18:18 ` [PATCH 11/17] x86/PCI: Remove acpi_get_pxm() usage Bjorn Helgaas
2014-01-29 18:18 ` [PATCH 12/17] ia64 / sba_iommu: Use NUMA_NO_NODE, not MAX_NUMNODES, for unknown node Bjorn Helgaas
2014-01-29 18:19 ` [PATCH 13/17] ia64: Remove acpi_get_pxm() usage Bjorn Helgaas
2014-01-29 18:19 ` [PATCH 14/17] ACPI / numa: Fix acpi_get_node() prototype Bjorn Helgaas
2014-01-29 18:19 ` [PATCH 15/17] ACPI / numa: Simplify acpi_get_node() style Bjorn Helgaas
2014-01-29 18:19 ` [PATCH 16/17] ACPI / numa: Make __acpi_map_pxm_to_node(), acpi_get_pxm() static Bjorn Helgaas
2014-01-29 18:19 ` [PATCH 17/17] ACPI / numa: Use __weak, not the gcc-specific version Bjorn Helgaas
2014-01-29 21:23 ` [PATCH 00/17] x86, ia64 NUMA cleanup Rafael J. Wysocki
2014-02-03 19:23 ` Bjorn Helgaas
2014-02-04 18:32   ` Luck, Tony

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140129181841.15476.36375.stgit@bhelgaas-glaptop.roam.corp.google.com \
    --to=bhelgaas@google.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox