]> Git Repo - J-linux.git/commitdiff
memblock tests: fix implicit declaration of function 'numa_valid_node'
authorWei Yang <[email protected]>
Mon, 24 Jun 2024 01:54:32 +0000 (01:54 +0000)
committerMike Rapoport <[email protected]>
Fri, 5 Jul 2024 08:24:47 +0000 (11:24 +0300)
commit 8043832e2a12 ("memblock: use numa_valid_node() helper to check
for invalid node ID") introduce a new helper numa_valid_node(), which is
not defined in memblock tests.

Let's add it in the corresponding header file.

Signed-off-by: Wei Yang <[email protected]>
CC: Mike Rapoport (IBM) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mike Rapoport <[email protected]>
tools/include/linux/numa.h

index 110b0e5d0fb0041226361603aa2d197496363b49..c8b9369335e0006fa4d598c860ff974877331e7e 100644 (file)
@@ -13,4 +13,9 @@
 
 #define        NUMA_NO_NODE    (-1)
 
+static inline bool numa_valid_node(int nid)
+{
+       return nid >= 0 && nid < MAX_NUMNODES;
+}
+
 #endif /* _LINUX_NUMA_H */
This page took 0.054401 seconds and 4 git commands to generate.