Skip to content

Commit

Permalink
ACPI: NUMA: Remove unnecessary check in acpi_parse_gi_affinity()
Browse files Browse the repository at this point in the history
The acpi_map_pxm_to_node() function will never return a node value
that is greater than or equal to MAX_NUMNODES. Remove the unnecessary
`node >= MAX_NUMNODES` check to keep the code consistent with other users
of the acpi_map_pxm_to_node() function.

Signed-off-by: Yuntao Wang <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
ytcoode authored and rafaeljw committed Dec 12, 2023
1 parent a39b6ac commit 9ecc3b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/numa/srat.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ acpi_parse_gi_affinity(union acpi_subtable_headers *header,
return -EINVAL;

node = acpi_map_pxm_to_node(gi_affinity->proximity_domain);
if (node == NUMA_NO_NODE || node >= MAX_NUMNODES) {
if (node == NUMA_NO_NODE) {
pr_err("SRAT: Too many proximity domains.\n");
return -EINVAL;
}
Expand Down

0 comments on commit 9ecc3b3

Please sign in to comment.