]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
memblock tests: define MIGRATE_CMA
authorPratyush Yadav (Google) <pratyush@kernel.org>
Mon, 4 May 2026 10:27:40 +0000 (12:27 +0200)
committerMike Rapoport (Microsoft) <rppt@kernel.org>
Sun, 31 May 2026 23:31:38 +0000 (02:31 +0300)
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 <rppt@kernel.org>
Closes: https://lore.kernel.org/linux-mm/afcdDm4aAJvNaQqH@kernel.org/
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Link: https://patch.msgid.link/20260504102742.3833159-1-pratyush@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
tools/testing/memblock/linux/mmzone.h

index bb682659a12dfb1c7ae556550df477b406d90e86..8d934ff5b080224c8af95eeb462f831cd75bc6f5 100644 (file)
@@ -35,4 +35,8 @@ typedef struct pglist_data {
 
 } pg_data_t;
 
+enum migratetype {
+       MIGRATE_CMA,
+};
+
 #endif