On Mon, May 4, 2026 at 6:27 AM Pratyush Yadav <[email protected]> wrote:
>
> From: "Pratyush Yadav (Google)" <[email protected]>
>
> 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 <[email protected]>
> Closes: https://lore.kernel.org/linux-mm/[email protected]/

Link does not open for me.

Pasha

> Signed-off-by: Pratyush Yadav (Google) <[email protected]>
> ---
>
> Notes:
>     I didn't add a Fixes here since the commit hash for the deferred series
>     isn't stable yet. Anyway, I think we should fold this into "kho: fix
>     deferred initialization of scratch areas". So random bisects don't land
>     on a broken test.
>
>  tools/testing/memblock/linux/mmzone.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/testing/memblock/linux/mmzone.h 
> b/tools/testing/memblock/linux/mmzone.h
> index bb682659a12d..8d934ff5b080 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
>
> base-commit: 74d1099bb4edfca3ce6edc61dbacbed96720034c
> --
> 2.54.0.545.g6539524ca2-goog
>

Reply via email to