[PATCH 1/5] memblock test: fix implicit declaration of function 'virt_to_phys'

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

 



Commit 94ff46de4a73 ("memblock: Move late alloc warning down to phys
alloc") introduce the usage of virt_to_phys(), which is not defined in
memblock tests.

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

Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
---
 tools/testing/memblock/linux/kernel.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/memblock/linux/kernel.h b/tools/testing/memblock/linux/kernel.h
index d2f148bd8902..ca56f36ef296 100644
--- a/tools/testing/memblock/linux/kernel.h
+++ b/tools/testing/memblock/linux/kernel.h
@@ -9,4 +9,6 @@
 #include <linux/linkage.h>
 #include <linux/kconfig.h>
 
+#define virt_to_phys(p) ((unsigned long)p)
+
 #endif
-- 
2.34.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux