From: Pratyush Yadav (Google) Date: Mon, 4 May 2026 10:27:40 +0000 (+0200) Subject: memblock tests: define MIGRATE_CMA X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=051a224c4933e58a0592c5528e89831099c65d6b;p=thirdparty%2Fkernel%2Flinux.git memblock tests: define MIGRATE_CMA kho_scratch_migratetype(), defined in include/linux/memblock.h uses enum migratetype. This breaks build for memblock tests with: ./linux/memblock.h:634:73: error: parameter 2 (‘mt’) has incomplete type 634 | enum migratetype mt) Fix it by defining enum migratetype and MIGRATE_CMA. As is the case with the other headers in tools/testing/memblock, do not bring in the whole thing, only what is needed. Reported-by: Mike Rapoport Closes: https://lore.kernel.org/linux-mm/afcdDm4aAJvNaQqH@kernel.org/ Signed-off-by: Pratyush Yadav (Google) Link: https://patch.msgid.link/20260504102742.3833159-1-pratyush@kernel.org Signed-off-by: Mike Rapoport (Microsoft) --- diff --git a/tools/testing/memblock/linux/mmzone.h b/tools/testing/memblock/linux/mmzone.h index bb682659a12df..8d934ff5b0802 100644 --- a/tools/testing/memblock/linux/mmzone.h +++ b/tools/testing/memblock/linux/mmzone.h @@ -35,4 +35,8 @@ typedef struct pglist_data { } pg_data_t; +enum migratetype { + MIGRATE_CMA, +}; + #endif