Skip to content

Commit 9364a7e

Browse files
RichardWeiYangrppt
authored andcommitted
memblock tests: fix implicit declaration of function 'numa_valid_node'
commit 8043832 ("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]>
1 parent 94ff46d commit 9364a7e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/include/linux/numa.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,9 @@
1313

1414
#define NUMA_NO_NODE (-1)
1515

16+
static inline bool numa_valid_node(int nid)
17+
{
18+
return nid >= 0 && nid < MAX_NUMNODES;
19+
}
20+
1621
#endif /* _LINUX_NUMA_H */

0 commit comments

Comments
 (0)