summaryrefslogtreecommitdiff
path: root/tools/testing/memblock
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2024-08-06 04:03:17 +0300
committerMike Rapoport (Microsoft) <rppt@kernel.org>2024-08-06 08:21:25 +0300
commita88cde5769d523e4ae6aad61237e4a5f6bd2309a (patch)
treedd9def9633a688b9b3f8c6d0aa1a5b57a557aec4 /tools/testing/memblock
parent9f76c2ade323121f9006f6a529e0795317e16b5c (diff)
downloadlinux-a88cde5769d523e4ae6aad61237e4a5f6bd2309a.tar.xz
memblock test: fix implicit declaration of function 'memparse'
Commit 1e4c64b71c9b ("mm/memblock: Add "reserve_mem" to reserved named memory at boot up") introduce the usage of memparse(), which is not defined in memblock test. Add the definition and link it to fix the build. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Link: https://lore.kernel.org/r/20240806010319.29194-3-richard.weiyang@gmail.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'tools/testing/memblock')
-rw-r--r--tools/testing/memblock/Makefile2
-rw-r--r--tools/testing/memblock/linux/kernel.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile
index 7a1ca694a982..d80982ccdc20 100644
--- a/tools/testing/memblock/Makefile
+++ b/tools/testing/memblock/Makefile
@@ -8,7 +8,7 @@ LDFLAGS += -fsanitize=address -fsanitize=undefined
TARGETS = main
TEST_OFILES = tests/alloc_nid_api.o tests/alloc_helpers_api.o tests/alloc_api.o \
tests/basic_api.o tests/common.o tests/alloc_exact_nid_api.o
-DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o
+DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o cmdline.o
OFILES = main.o $(DEP_OFILES) $(TEST_OFILES)
EXTR_SRC = ../../../mm/memblock.c
diff --git a/tools/testing/memblock/linux/kernel.h b/tools/testing/memblock/linux/kernel.h
index d2f148bd8902..c16d9cd2d1ae 100644
--- a/tools/testing/memblock/linux/kernel.h
+++ b/tools/testing/memblock/linux/kernel.h
@@ -8,5 +8,6 @@
#include <linux/printk.h>
#include <linux/linkage.h>
#include <linux/kconfig.h>
+#include <linux/string.h>
#endif