[PATCH 2/2] powerpc/numa: Remove a redundant variable
Srikar Dronamraju
srikar at linux.vnet.ibm.com
Wed Jul 15 22:05:34 AEST 2020
In of_drconf_to_nid_single() default_nid always refers to NUMA_NO_NODE.
Hence replace it with NUMA_NO_NODE.
No functional changes.
Cc: linuxppc-dev <linuxppc-dev at lists.ozlabs.org>
Cc: Michael Ellerman <michaele at au1.ibm.com>
Cc: Nathan Lynch <nathanl at linux.ibm.com>
Cc: Tyrel Datwyler <tyreld at linux.ibm.com>
Signed-off-by: Srikar Dronamraju <srikar at linux.vnet.ibm.com>
---
arch/powerpc/mm/numa.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index a2c5fe0d0cad..b066d89c2975 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -432,16 +432,15 @@ static int of_get_assoc_arrays(struct assoc_arrays *aa)
static int of_drconf_to_nid_single(struct drmem_lmb *lmb)
{
struct assoc_arrays aa = { .arrays = NULL };
- int default_nid = NUMA_NO_NODE;
- int nid = default_nid;
+ int nid = NUMA_NO_NODE;
int rc, index;
if ((min_common_depth < 0) || !numa_enabled)
- return default_nid;
+ return NUMA_NO_NODE;
rc = of_get_assoc_arrays(&aa);
if (rc)
- return default_nid;
+ return NUMA_NO_NODE;
if (min_common_depth <= aa.array_sz &&
!(lmb->flags & DRCONF_MEM_AI_INVALID) && lmb->aa_index < aa.n_arrays) {
@@ -449,7 +448,7 @@ static int of_drconf_to_nid_single(struct drmem_lmb *lmb)
nid = of_read_number(&aa.arrays[index], 1);
if (nid == 0xffff || nid >= num_possible_nodes())
- nid = default_nid;
+ nid = NUMA_NO_NODE;
if (nid > 0) {
index = lmb->aa_index * aa.array_sz;
--
2.18.2
More information about the Linuxppc-dev
mailing list