Re: [PATCH] mm/memblock: Remove redundant pageblock_align() in free_unused_memmap()

From: Mike Rapoport

Date: Sun Jun 14 2026 - 05:20:53 EST


On Fri, Jun 12, 2026 at 11:11:05AM +0800, Zhen Ni wrote:
> The assignment `prev_end = pageblock_align(end)` is redundant because
> `prev_end` was already aligned to pageblock oundaries inside the loop.
> Since pageblock_align() is a pure function, calling it again with the
> same input produces the same result.
>
> This line was added in commit f921f53e089a ("memblock: align freed
> memory map on pageblock boundaries with SPARSEMEM"). Remove it to
> simplify the code.
>
> Signed-off-by: Zhen Ni <zhen.ni@xxxxxxxxxxxx>

I queued it up for after -rc1.

> ---
> mm/memblock.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

--
Sincerely yours,
Mike.