[PATCH 6.6 039/129] memblock tests: fix implicit declaration of function numa_valid_node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



6.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wei Yang <richard.weiyang@xxxxxxxxx>

commit 9364a7e40d54e6858479f0a96e1a04aa1204be16 upstream.

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 <richard.weiyang@xxxxxxxxx>
CC: Mike Rapoport (IBM) <rppt@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20240624015432.31134-1-richard.weiyang@xxxxxxxxx
Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 tools/include/linux/numa.h |    5 +++++
 1 file changed, 5 insertions(+)

--- a/tools/include/linux/numa.h
+++ b/tools/include/linux/numa.h
@@ -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 */






[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux