Running 'make CC=clang' under tools/testing/memblock, I've noticed the following: clang -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined \ -D CONFIG_PHYS_ADDR_T_64BIT -c -o memblock.o memblock.c memblock.c:783:44: error: use of undeclared identifier 'SZ_1M' 783 | mem_size_mb = memblock_phys_mem_size() / SZ_1M; | ^~~~~ memblock.c:785:37: error: use of undeclared identifier 'SZ_1M' 785 | (nr_pages << PAGE_SHIFT) / SZ_1M, mem_size_mb); | ^~~~~ So just include linux/sizes.h from the linux/kernel.h stub. Signed-off-by: Dmitry Antipov --- tools/testing/memblock/linux/kernel.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/memblock/linux/kernel.h b/tools/testing/memblock/linux/kernel.h index 4d1012d5be6e..3401ea867c8f 100644 --- a/tools/testing/memblock/linux/kernel.h +++ b/tools/testing/memblock/linux/kernel.h @@ -10,5 +10,6 @@ #include #include #include +#include #endif -- 2.52.0