mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
There are several occurrences of the following pattern:
for_each_memblock(memory, reg) {
start = __pfn_to_phys(memblock_region_memory_base_pfn(reg);
end = __pfn_to_phys(memblock_region_memory_end_pfn(reg));
/* do something with start and end */
}
Using for_each_mem_range() iterator is more appropriate in such cases and
allows simpler and cleaner code.
[akpm@linux-foundation.org: fix arch/arm/mm/pmsa-v7.c build]
[rppt@linux.ibm.com: mips: fix cavium-octeon build caused by memblock refactoring]
Link: http://lkml.kernel.org/r/20200827124549.GD167163@linux.ibm.com
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Baoquan He <bhe@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Daniel Axtens <dja@axtens.net>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Emil Renner Berthing <kernel@esmil.dk>
Cc: Hari Bathini <hbathini@linux.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: https://lkml.kernel.org/r/20200818151634.14343-13-rppt@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||
|---|---|---|
| .. | ||
| boot | ||
| common | ||
| configs | ||
| crypto | ||
| include | ||
| kernel | ||
| lib | ||
| mach-actions | ||
| mach-alpine | ||
| mach-artpec | ||
| mach-asm9260 | ||
| mach-aspeed | ||
| mach-at91 | ||
| mach-axxia | ||
| mach-bcm | ||
| mach-berlin | ||
| mach-clps711x | ||
| mach-cns3xxx | ||
| mach-davinci | ||
| mach-digicolor | ||
| mach-dove | ||
| mach-ebsa110 | ||
| mach-efm32 | ||
| mach-ep93xx | ||
| mach-exynos | ||
| mach-footbridge | ||
| mach-gemini | ||
| mach-highbank | ||
| mach-hisi | ||
| mach-imx | ||
| mach-integrator | ||
| mach-iop32x | ||
| mach-ixp4xx | ||
| mach-keystone | ||
| mach-lpc18xx | ||
| mach-lpc32xx | ||
| mach-mediatek | ||
| mach-meson | ||
| mach-milbeaut | ||
| mach-mmp | ||
| mach-moxart | ||
| mach-mstar | ||
| mach-mv78xx0 | ||
| mach-mvebu | ||
| mach-mxs | ||
| mach-nomadik | ||
| mach-npcm | ||
| mach-nspire | ||
| mach-omap1 | ||
| mach-omap2 | ||
| mach-orion5x | ||
| mach-oxnas | ||
| mach-picoxcell | ||
| mach-prima2 | ||
| mach-pxa | ||
| mach-qcom | ||
| mach-rda | ||
| mach-realtek | ||
| mach-realview | ||
| mach-rockchip | ||
| mach-rpc | ||
| mach-s3c24xx | ||
| mach-s3c64xx | ||
| mach-s5pv210 | ||
| mach-sa1100 | ||
| mach-shmobile | ||
| mach-socfpga | ||
| mach-spear | ||
| mach-sti | ||
| mach-stm32 | ||
| mach-sunxi | ||
| mach-tango | ||
| mach-tegra | ||
| mach-u300 | ||
| mach-uniphier | ||
| mach-ux500 | ||
| mach-versatile | ||
| mach-vexpress | ||
| mach-vt8500 | ||
| mach-zx | ||
| mach-zynq | ||
| mm | ||
| net | ||
| nwfpe | ||
| oprofile | ||
| plat-omap | ||
| plat-orion | ||
| plat-pxa | ||
| plat-samsung | ||
| plat-versatile | ||
| probes | ||
| tools | ||
| vdso | ||
| vfp | ||
| xen | ||
| Kbuild | ||
| Kconfig | ||
| Kconfig-nommu | ||
| Kconfig.assembler | ||
| Kconfig.debug | ||
| Makefile | ||