[PATCH v2 5/5] tools/bootconfig: Define memblock_free_ptr() to fix build error

From: Masami Hiramatsu
Date: Tue Sep 14 2021 - 20:53:52 EST


Since commit 77e02cf57b6c ("memblock: introduce saner
'memblock_free_ptr()' interface") introduced memblock_free_ptr()
to lib/bootconfig.c, bootconfig tool also has to define
memblock_free_ptr() wrapper, and remove unused __pa() and
memblock_free().

Fixes: 77e02cf57b6c ("memblock: introduce saner 'memblock_free_ptr()' interface")
Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
---
tools/bootconfig/include/linux/memblock.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/bootconfig/include/linux/memblock.h b/tools/bootconfig/include/linux/memblock.h
index 7862f217d85d..f2e506f7d57f 100644
--- a/tools/bootconfig/include/linux/memblock.h
+++ b/tools/bootconfig/include/linux/memblock.h
@@ -4,9 +4,8 @@

#include <stdlib.h>

-#define __pa(addr) (addr)
#define SMP_CACHE_BYTES 0
#define memblock_alloc(size, align) malloc(size)
-#define memblock_free(paddr, size) free(paddr)
+#define memblock_free_ptr(paddr, size) free(paddr)

#endif