diff mbox series

[v3,2/5] memblock test: add the definition of __setup()

Message ID 20240802010923.15577-2-richard.weiyang@gmail.com (mailing list archive)
State New
Headers show
Series [v3,1/5] memblock test: fix implicit declaration of function 'virt_to_phys' | expand

Commit Message

Wei Yang Aug. 2, 2024, 1:09 a.m. UTC
Commit 1e4c64b71c9b ("mm/memblock: Add "reserve_mem" to reserved named
memory at boot up") introduce usage of __setup(), which is not defined
in memblock test.

Define it in init.h to fix the build error.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 tools/testing/memblock/linux/init.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/tools/testing/memblock/linux/init.h b/tools/testing/memblock/linux/init.h
index 828e0ee0bc6c..036616a25427 100644
--- a/tools/testing/memblock/linux/init.h
+++ b/tools/testing/memblock/linux/init.h
@@ -28,6 +28,9 @@  struct obs_kernel_param {
 		__aligned(__alignof__(struct obs_kernel_param)) =	\
 		{ __setup_str_##unique_id, fn, early }
 
+#define __setup(str, fn)						\
+	__setup_param(str, fn, fn, 0)
+
 #define early_param(str, fn)						\
 	__setup_param(str, fn, fn, 1)