Re: [PATCH v3 1/2] memblock: drop for_each_memblock_type() and open code its users
From: sashiko-bot
Date: Sat Sep 26 2026 - 05:30:13 EST
> 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.
>
> No functional change.
>
> Reviewed-by: Pratyush Yadav <pratyush@xxxxxxxxxx>
> Signed-off-by: Tarun Sahu <tarunsahu@xxxxxxxxxx>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260926092448.4090401-1-tarunsahu@xxxxxxxxxx?part=1