Skip to content

Commit 051a224

Browse files
prati0100rppt
authored andcommitted
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 <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>
1 parent d8e47bd commit 051a224

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/testing/memblock/linux/mmzone.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,8 @@ typedef struct pglist_data {
3535

3636
} pg_data_t;
3737

38+
enum migratetype {
39+
MIGRATE_CMA,
40+
};
41+
3842
#endif

0 commit comments

Comments
 (0)