aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJianguo Wu <wujianguo@huawei.com>2013-08-29 21:25:40 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-09-23 19:40:38 -0400
commit1bb25df0fde2cdb2f250a7e7e43c2ec1ba65d0f5 (patch)
tree1a4677685754ff7f3350aaaeb644613098a7905b /drivers
parent4a10c2ac2f368583138b774ca41fac4207911983 (diff)
ACPI / mm: use NUMA_NO_NODE
Use more appropriate NUMA_NO_NODE instead of -1 Signed-off-by: Jianguo Wu <wujianguo@huawei.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/acpi_memhotplug.c2
-rw-r--r--drivers/acpi/numa.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 999adb5499c7..c00a3a73409b 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -281,7 +281,7 @@ static void acpi_memory_remove_memory(struct acpi_memory_device *mem_device)
281 if (!info->enabled) 281 if (!info->enabled)
282 continue; 282 continue;
283 283
284 if (nid < 0) 284 if (nid == NUMA_NO_NODE)
285 nid = memory_add_physaddr_to_nid(info->start_addr); 285 nid = memory_add_physaddr_to_nid(info->start_addr);
286 286
287 acpi_unbind_memory_blocks(info, handle); 287 acpi_unbind_memory_blocks(info, handle);
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 2e82e5d76930..a2343a1d9e0b 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -73,7 +73,7 @@ int acpi_map_pxm_to_node(int pxm)
73{ 73{
74 int node = pxm_to_node_map[pxm]; 74 int node = pxm_to_node_map[pxm];
75 75
76 if (node < 0) { 76 if (node == NUMA_NO_NODE) {
77 if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) 77 if (nodes_weight(nodes_found_map) >= MAX_NUMNODES)
78 return NUMA_NO_NODE; 78 return NUMA_NO_NODE;
79 node = first_unset_node(nodes_found_map); 79 node = first_unset_node(nodes_found_map);
@@ -334,7 +334,7 @@ int acpi_get_pxm(acpi_handle h)
334 334
335int acpi_get_node(acpi_handle *handle) 335int acpi_get_node(acpi_handle *handle)
336{ 336{
337 int pxm, node = -1; 337 int pxm, node = NUMA_NO_NODE;
338 338
339 pxm = acpi_get_pxm(handle); 339 pxm = acpi_get_pxm(handle);
340 if (pxm >= 0 && pxm < MAX_PXM_DOMAINS) 340 if (pxm >= 0 && pxm < MAX_PXM_DOMAINS)