]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - arch/powerpc/mm/numa.c
mm: replace all open encodings for NUMA_NO_NODE
[mirror_ubuntu-jammy-kernel.git] / arch / powerpc / mm / numa.c
index 87f0dd004295761b321216adf333f1eab1ca09df..270cefb75cca8031b50fdec8585100a7d6b90f02 100644 (file)
@@ -215,7 +215,7 @@ static void initialize_distance_lookup_table(int nid,
  */
 static int associativity_to_nid(const __be32 *associativity)
 {
-       int nid = -1;
+       int nid = NUMA_NO_NODE;
 
        if (min_common_depth == -1)
                goto out;
@@ -225,7 +225,7 @@ static int associativity_to_nid(const __be32 *associativity)
 
        /* POWER4 LPAR uses 0xffff as invalid node */
        if (nid == 0xffff || nid >= MAX_NUMNODES)
-               nid = -1;
+               nid = NUMA_NO_NODE;
 
        if (nid > 0 &&
                of_read_number(associativity, 1) >= distance_ref_points_depth) {
@@ -244,7 +244,7 @@ out:
  */
 static int of_node_to_nid_single(struct device_node *device)
 {
-       int nid = -1;
+       int nid = NUMA_NO_NODE;
        const __be32 *tmp;
 
        tmp = of_get_associativity(device);
@@ -256,7 +256,7 @@ static int of_node_to_nid_single(struct device_node *device)
 /* Walk the device tree upwards, looking for an associativity id */
 int of_node_to_nid(struct device_node *device)
 {
-       int nid = -1;
+       int nid = NUMA_NO_NODE;
 
        of_node_get(device);
        while (device) {
@@ -454,7 +454,7 @@ static int of_drconf_to_nid_single(struct drmem_lmb *lmb)
  */
 static int numa_setup_cpu(unsigned long lcpu)
 {
-       int nid = -1;
+       int nid = NUMA_NO_NODE;
        struct device_node *cpu;
 
        /*
@@ -930,7 +930,7 @@ static int hot_add_drconf_scn_to_nid(unsigned long scn_addr)
 {
        struct drmem_lmb *lmb;
        unsigned long lmb_size;
-       int nid = -1;
+       int nid = NUMA_NO_NODE;
 
        lmb_size = drmem_lmb_size();
 
@@ -960,7 +960,7 @@ static int hot_add_drconf_scn_to_nid(unsigned long scn_addr)
 static int hot_add_node_scn_to_nid(unsigned long scn_addr)
 {
        struct device_node *memory;
-       int nid = -1;
+       int nid = NUMA_NO_NODE;
 
        for_each_node_by_type(memory, "memory") {
                unsigned long start, size;