summaryrefslogtreecommitdiff
path: root/arch/x86/pci/amd_bus.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-05-01 17:25:18 -0600
committerBjorn Helgaas <bhelgaas@google.com>2012-05-01 17:25:18 -0600
commit0f1103e40f9186bd2cdac4dde6c5bbd2f5273365 (patch)
tree0068bce90fa221502a7646178fa484a26b7c2694 /arch/x86/pci/amd_bus.c
parent29473ec23aa79d401ffe06ec3f3ad3755382be13 (diff)
x86/PCI: fix unused variable warning in amd_bus.c
Fix this warning: arch/x86/pci/amd_bus.c: In function 'early_fill_mp_bus_info': arch/x86/pci/amd_bus.c:56:6: warning: unused variable 'j' [-Wunused-variable] introduced by commit d28e5ac2a07e ("x86/PCI: dynamically allocate pci_root_info for native host bridge drivers"). Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'arch/x86/pci/amd_bus.c')
-rw-r--r--arch/x86/pci/amd_bus.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c
index 459a7316375c..5aed49bff058 100644
--- a/arch/x86/pci/amd_bus.c
+++ b/arch/x86/pci/amd_bus.c
@@ -44,6 +44,15 @@ static struct pci_root_info __init *find_pci_root_info(int node, int link)
return NULL;
}
+static void __init set_mp_bus_range_to_node(int min_bus, int max_bus, int node)
+{
+#ifdef CONFIG_NUMA
+ int j;
+
+ for (j = min_bus; j <= max_bus; j++)
+ set_mp_bus_to_node(j, node);
+#endif
+}
/**
* early_fill_mp_bus_to_node()
* called before pcibios_scan_root and pci_scan_bus
@@ -53,7 +62,6 @@ static struct pci_root_info __init *find_pci_root_info(int node, int link)
static int __init early_fill_mp_bus_info(void)
{
int i;
- int j;
unsigned bus;
unsigned slot;
int node;
@@ -109,10 +117,7 @@ static int __init early_fill_mp_bus_info(void)
min_bus = (reg >> 16) & 0xff;
max_bus = (reg >> 24) & 0xff;
node = (reg >> 4) & 0x07;
-#ifdef CONFIG_NUMA
- for (j = min_bus; j <= max_bus; j++)
- set_mp_bus_to_node(j, node);
-#endif
+ set_mp_bus_range_to_node(min_bus, max_bus, node);
link = (reg >> 8) & 0x03;
info = alloc_pci_root_info(min_bus, max_bus, node, link);