[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <521FF57A.8080702@huawei.com>
Date: Fri, 30 Aug 2013 09:29:30 +0800
From: Jianguo Wu <wujianguo@...wei.com>
To: Andrew Morton <akpm@...ux-foundation.org>, <tglx@...utronix.de>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<linux-mm@...ck.org>, David Rientjes <rientjes@...gle.com>,
<mingo@...hat.com>
Subject: [PATCH 3/4] x86/srat: use NUMA_NO_NODE
setup_node() return NUMA_NO_NODE or valid node id(>=0), So use more appropriate
"if (node == NUMA_NO_NODE)" instead of "if (node < 0)"
Signed-off-by: Jianguo Wu <wujianguo@...wei.com>
---
arch/x86/mm/srat.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c
index cdd0da9..97fea4e 100644
--- a/arch/x86/mm/srat.c
+++ b/arch/x86/mm/srat.c
@@ -76,7 +76,7 @@ acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa)
return;
}
node = setup_node(pxm);
- if (node < 0) {
+ if (node == NUMA_NO_NODE) {
printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
bad_srat();
return;
@@ -112,7 +112,7 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
if (acpi_srat_revision >= 2)
pxm |= *((unsigned int*)pa->proximity_domain_hi) << 8;
node = setup_node(pxm);
- if (node < 0) {
+ if (node == NUMA_NO_NODE) {
printk(KERN_ERR "SRAT: Too many proximity domains %x\n", pxm);
bad_srat();
return;
@@ -164,7 +164,7 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
pxm &= 0xff;
node = setup_node(pxm);
- if (node < 0) {
+ if (node == NUMA_NO_NODE) {
printk(KERN_ERR "SRAT: Too many proximity domains.\n");
goto out_err_bad_srat;
}
--
1.7.1
--
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