[PATCH v2 16/17] memblock: implement for_each_reserved_mem_region() using __next_mem_region()
Baoquan He
bhe at redhat.com
Wed Aug 5 05:11:05 EDT 2020
On 08/02/20 at 07:36pm, Mike Rapoport wrote:
> From: Mike Rapoport <rppt at linux.ibm.com>
>
> Iteration over memblock.reserved with for_each_reserved_mem_region() used
> __next_reserved_mem_region() that implemented a subset of
> __next_mem_region().
>
> Use __for_each_mem_range() and, essentially, __next_mem_region() with
> appropriate parameters to reduce code duplication.
>
> While on it, rename for_each_reserved_mem_region() to
> for_each_reserved_mem_range() for consistency.
>
> Signed-off-by: Mike Rapoport <rppt at linux.ibm.com>
> ---
> .clang-format | 2 +-
> arch/arm64/kernel/setup.c | 2 +-
> drivers/irqchip/irq-gic-v3-its.c | 2 +-
> include/linux/memblock.h | 12 +++------
> mm/memblock.c | 46 +++++++-------------------------
> 5 files changed, 17 insertions(+), 47 deletions(-)
Reviewed-by: Baoquan He <bhe at redhat.com>
More information about the linux-riscv
mailing list