path: root/arch/x86/include/asm
diff options
authorAnshuman Khandual <>2019-03-05 15:42:58 -0800
committerLinus Torvalds <>2019-03-05 21:07:14 -0800
commit98fa15f34cb379864757670b8e8743b21456a20e (patch)
tree18a360dd850e9a5d67db7a0700f0b3a82a3f8e2b /arch/x86/include/asm
parent6ade20327dbb808882888ed8ccded71e93067cf9 (diff)
mm: replace all open encodings for NUMA_NO_NODE
Patch series "Replace all open encodings for NUMA_NO_NODE", v3. All these places for replacement were found by running the following grep patterns on the entire kernel code. Please let me know if this might have missed some instances. This might also have replaced some false positives. I will appreciate suggestions, inputs and review. 1. git grep "nid == -1" 2. git grep "node == -1" 3. git grep "nid = -1" 4. git grep "node = -1" This patch (of 2): At present there are multiple places where invalid node number is encoded as -1. Even though implicitly understood it is always better to have macros in there. Replace these open encodings for an invalid node number with the global macro NUMA_NO_NODE. This helps remove NUMA related assumptions like 'invalid node' from various places redirecting them to a common definition. Link: Signed-off-by: Anshuman Khandual <> Reviewed-by: David Hildenbrand <> Acked-by: Jeff Kirsher <> [ixgbe] Acked-by: Jens Axboe <> [mtip32xx] Acked-by: Vinod Koul <> [dmaengine.c] Acked-by: Michael Ellerman <> [powerpc] Acked-by: Doug Ledford <> [drivers/infiniband] Cc: Joseph Qi <> Cc: Hans Verkuil <> Cc: Stephen Rothwell <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'arch/x86/include/asm')
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h
index 662963681ea6..e662f987dfa2 100644
--- a/arch/x86/include/asm/pci.h
+++ b/arch/x86/include/asm/pci.h
@@ -7,6 +7,7 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/scatterlist.h>
+#include <linux/numa.h>
#include <asm/io.h>
#include <asm/pat.h>
#include <asm/x86_init.h>
@@ -141,7 +142,7 @@ cpumask_of_pcibus(const struct pci_bus *bus)
int node;
node = __pcibus_to_node(bus);
- return (node == -1) ? cpu_online_mask :
+ return (node == NUMA_NO_NODE) ? cpu_online_mask :