Re: [RFC PATCH 05/12] mm/cma: add helper functions for CMA balancing
From: Rik van Riel
Date: Tue Sep 16 2025 - 18:58:18 EST
On Mon, 2025-09-15 at 19:51 +0000, Frank van der Linden wrote:
>
> +/*
> + * Provide the next free range in a cma memory range, as derived
> + * from the bitmap.
> + *
> + * @cmr: memory range to scan
> + * @start_pfn: the beginning of the previous range
> + * @end_pfn: the end of the previous range, zero for the first call
> + *
> + * The caller can adjust *end_pfn end use it as a starting point.
> + */
The function documentation does not really make it clear
that start_pfn and end_pfn are also used for the function
OUTPUT, and that the return value indicates whether or
not a next area was found.
Same for cma_next_noncma_pagerange. Other than that, this
looks reasonable so far.
--
All Rights Reversed.