Skip to content

Commit 0bd8127

Browse files
npigginmpe
authored andcommitted
powerpc/pseries: rename numa_dist_table to form2_distances
The name of the local variable holding the "form2" property address conflicts with the numa_distance_table global. This patch does 's/numa_dist_table/form2_distances/g' over the function, which also renames numa_dist_table_length to form2_distances_length. Suggested-by: Michael Ellerman <[email protected]> Signed-off-by: Nicholas Piggin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 964c33c commit 0bd8127

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

arch/powerpc/mm/numa.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,9 @@ static void initialize_form2_numa_distance_lookup_table(void)
376376
{
377377
int i, j;
378378
struct device_node *root;
379-
const __u8 *numa_dist_table;
379+
const __u8 *form2_distances;
380380
const __be32 *numa_lookup_index;
381-
int numa_dist_table_length;
381+
int form2_distances_length;
382382
int max_numa_index, distance_index;
383383

384384
if (firmware_has_feature(FW_FEATURE_OPAL))
@@ -392,20 +392,20 @@ static void initialize_form2_numa_distance_lookup_table(void)
392392
max_numa_index = of_read_number(&numa_lookup_index[0], 1);
393393

394394
/* first element of the array is the size and is encode-int */
395-
numa_dist_table = of_get_property(root, "ibm,numa-distance-table", NULL);
396-
numa_dist_table_length = of_read_number((const __be32 *)&numa_dist_table[0], 1);
395+
form2_distances = of_get_property(root, "ibm,numa-distance-table", NULL);
396+
form2_distances_length = of_read_number((const __be32 *)&form2_distances[0], 1);
397397
/* Skip the size which is encoded int */
398-
numa_dist_table += sizeof(__be32);
398+
form2_distances += sizeof(__be32);
399399

400-
pr_debug("numa_dist_table_len = %d, numa_dist_indexes_len = %d\n",
401-
numa_dist_table_length, max_numa_index);
400+
pr_debug("form2_distances_len = %d, numa_dist_indexes_len = %d\n",
401+
form2_distances_length, max_numa_index);
402402

403403
for (i = 0; i < max_numa_index; i++)
404404
/* +1 skip the max_numa_index in the property */
405405
numa_id_index_table[i] = of_read_number(&numa_lookup_index[i + 1], 1);
406406

407407

408-
if (numa_dist_table_length != max_numa_index * max_numa_index) {
408+
if (form2_distances_length != max_numa_index * max_numa_index) {
409409
WARN(1, "Wrong NUMA distance information\n");
410410
/* consider everybody else just remote. */
411411
for (i = 0; i < max_numa_index; i++) {
@@ -427,7 +427,7 @@ static void initialize_form2_numa_distance_lookup_table(void)
427427
int nodeA = numa_id_index_table[i];
428428
int nodeB = numa_id_index_table[j];
429429

430-
numa_distance_table[nodeA][nodeB] = numa_dist_table[distance_index++];
430+
numa_distance_table[nodeA][nodeB] = form2_distances[distance_index++];
431431
pr_debug("dist[%d][%d]=%d ", nodeA, nodeB, numa_distance_table[nodeA][nodeB]);
432432
}
433433
}

0 commit comments

Comments
 (0)