ACPI: NUMA: Fix the logic of getting the fake_pxm value
authorYuntao Wang <ytcoode@gmail.com>
Wed, 6 Dec 2023 10:43:18 +0000 (18:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:15 +0000 (20:14 +0000)
commitf6bda29501226fd47a0e9e7b9abeea267b1931e9
tree21c464b59f349071e6bba6a91d0f49f1b7767b4f
parenta95c77f93606ff34bc7eae5ce13e56c1f4f064ee
ACPI: NUMA: Fix the logic of getting the fake_pxm value

[ Upstream commit e3f577830ce216b0ca21d4750cbbd64cfc21efff ]

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: Yuntao Wang <ytcoode@gmail.com>
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/numa/srat.c