]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86/srat: use NUMA_NO_NODE
authorJianguo Wu <wujianguo@huawei.com>
Tue, 5 Nov 2013 05:54:48 +0000 (16:54 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:54:48 +0000 (16:54 +1100)
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@huawei.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/mm/srat.c

index 266ca912f62e00e96eab405ce6290f3d7466cec3..26f4e12716eee021e24bbf59ef83fadf8688f0f2 100644 (file)
@@ -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;
@@ -166,7 +166,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;
        }