Re: [PATCH v4 1/2] memblock: drop for_each_memblock_type() and open code its users
From: Mike Rapoport
Date: Tue Oct 13 2026 - 06:18:38 EST
From: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
On Thu, 08 Oct 2026 19:08:27 +0000, Tarun Sahu wrote:
> for_each_memblock_type() always starts the iteration at index 0 and its
> body is a trivial 'for' loop, so it hides very little. It also gets in
> the way of iterating from an arbitrary index, which the next patch
> needs.
>
> Remove the macro and open code its three users: memblock_add_range(),
> memblock_isolate_range() and memblock_dump(). While at it, move the
> region pointer into the loop body scope.
>
> [...]
Applied to for-next branch of memblock.git tree, thanks!
[1/2] memblock: drop for_each_memblock_type() and open code its users
commit: aedb8dde08f8cd93ce1cc3a23273f2ff7238f832
[2/2] memblock: use binary search to locate candidate regions
commit: 7a3477ec5793ab8c25be4db3e7dfe8a461bc775c
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
branch: for-next
--
Sincerely yours,
Mike.