Skip to content
Commit 8043832e authored by Mike Rapoport (IBM)'s avatar Mike Rapoport (IBM)
Browse files

memblock: use numa_valid_node() helper to check for invalid node ID



Introduce numa_valid_node(nid) that verifies that nid is a valid node ID
and use that instead of comparing nid parameter with either NUMA_NO_NODE
or MAX_NUMNODES.

This makes the checks for valid node IDs consistent and more robust and
allows to get rid of multiple WARNings.

Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarMike Rapoport (IBM) <rppt@kernel.org>
parent 3ac36aa7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment