linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] x86/srat: use NUMA_NO_NODE
@ 2013-08-30  1:29 Jianguo Wu
  2013-08-30 21:48 ` David Rientjes
  0 siblings, 1 reply; 2+ messages in thread
From: Jianguo Wu @ 2013-08-30  1:29 UTC (permalink / raw)
  To: Andrew Morton, tglx; +Cc: x86, linux-kernel, linux-mm, David Rientjes, mingo

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>
---
 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/4] x86/srat: use NUMA_NO_NODE
  2013-08-30  1:29 [PATCH 3/4] x86/srat: use NUMA_NO_NODE Jianguo Wu
@ 2013-08-30 21:48 ` David Rientjes
  0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2013-08-30 21:48 UTC (permalink / raw)
  To: Jianguo Wu; +Cc: Andrew Morton, tglx, x86, linux-kernel, linux-mm, mingo

On Fri, 30 Aug 2013, Jianguo Wu wrote:

> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-30 21:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-30  1:29 [PATCH 3/4] x86/srat: use NUMA_NO_NODE Jianguo Wu
2013-08-30 21:48 ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).