Commit e3f57783 authored by Yuntao Wang's avatar Yuntao Wang Committed by Rafael J. Wysocki
Browse files

ACPI: NUMA: Fix the logic of getting the fake_pxm value



The for loop does not iterate over the last element of the node_to_pxm_map
array. This could lead to a conflict between the final fake_pxm value and
the existing pxm values. That is, the final fake_pxm value can not be
guaranteed to be an unused pxm value.

While at it, fix up white space in slit_valid().

Signed-off-by: default avatarYuntao Wang <ytcoode@gmail.com>
[ rjw: Changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent ec0f9626
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -532,7 +532,7 @@ int __init acpi_numa_init(void)
	 */

	/* fake_pxm is the next unused PXM value after SRAT parsing */
	for (i = 0, fake_pxm = -1; i < MAX_NUMNODES - 1; i++) {
	for (i = 0, fake_pxm = -1; i < MAX_NUMNODES; i++) {
		if (node_to_pxm_map[i] > fake_pxm)
			fake_pxm = node_to_pxm_map[i];
	}