linux/drivers
Mike Rapoport b10d6bca87 arch, drivers: replace for_each_membock() with for_each_mem_range()
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>
2020-10-13 18:38:35 -07:00
..
accessibility Char/Misc driver fixes for 5.9-rc3 2020-08-26 10:50:50 -07:00
acpi ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device 2020-10-13 18:38:27 -07:00
amba
android drivers: android: Fix the SPDX comment style 2020-07-29 17:05:44 +02:00
ata ata: ahci: mvebu: Make SATA PHY optional for Armada 3720 2020-10-09 12:47:56 -06:00
atm atm: eni: fix the missed pci_disable_device() for eni_init_one() 2020-09-04 21:42:57 -07:00
auxdisplay A trivial patch for auxdisplay: 2020-09-05 14:22:46 -07:00
base drivers/base: make device_find_child_by_name() compatible with sysfs inputs 2020-10-13 18:38:28 -07:00
bcma bcma: gpio: Use irqchip template 2020-08-02 18:26:51 +03:00
block drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2020-07-31 15:11:52 -07:00
bus arch, drivers: replace for_each_membock() with for_each_mem_range() 2020-10-13 18:38:35 -07:00
cdrom gdrom: use bdev_check_media_change 2020-09-10 09:32:31 -06:00
char block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
clk clk: socfpga: stratix10: fix the divider for the emac_ptp_free_clk 2020-09-22 12:54:41 -07:00
clocksource Updates for timekeeping, timers and related drivers: 2020-10-12 11:27:54 -07:00
connector
counter counter: microchip-tcb-capture: check the correct variable 2020-08-22 11:38:42 +01:00
cpufreq cpufreq: intel_pstate: Fix missing return statement 2020-09-30 17:37:23 +02:00
cpuidle cpuidle: Drop misleading comments about RCU usage 2020-09-22 19:32:03 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-10-13 08:50:16 -07:00
dax device-dax: add a range mapping allocation attribute 2020-10-13 18:38:29 -07:00
dca
devfreq PM / devfreq: tegra30: Disable clock on error in probe 2020-09-23 13:35:58 +09:00
dio
dma dmaengine: dmatest: Prevent to run on misconfigured channel 2020-09-22 20:18:05 +05:30
dma-buf dmabuf: fix NULL pointer dereference in dma_buf_release() 2020-09-21 11:17:06 +02:00
edac EFI changes for v5.10: 2020-10-12 13:26:49 -07:00
eisa
extcon
firewire treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
firmware efi/fake_mem: arrange for a resource entry per efi_fake_mem instance 2020-10-13 18:38:27 -07:00
fpga Linux 5.8-rc7 2020-07-27 11:49:37 +02:00
fsi
gnss
gpio GPIO bulk changes for the v5.10 kernel cycle: 2020-10-13 10:09:33 -07:00
gpu i915: use find_lock_page instead of find_lock_entry 2020-10-13 18:38:29 -07:00
greybus greybus: Use fallthrough pseudo-keyword 2020-07-29 16:58:08 +02:00
hid Linux 5.9-rc4 2020-09-07 16:13:06 +02:00
hsi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hv hyperv-fixes for 5.9-rc6 2020-09-15 16:20:43 -07:00
hwmon hwmon: (pmbus/max20730) adjust the vout reading given voltage divider 2020-10-06 14:54:55 -07:00
hwspinlock
hwtracing treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
i2c i2c: owl: Clear NACK and BUS error bits 2020-10-10 13:15:46 +02:00
i3c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ide block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
idle cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic 2020-08-26 12:41:53 +02:00
iio iio: adc: qcom-spmi-adc5: fix driver name 2020-09-22 13:33:19 +01:00
infiniband block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2020-10-03 11:37:23 -07:00
interconnect interconnect: qcom: Fix small BW votes being truncated to zero 2020-09-04 00:07:12 +03:00
iommu Surgery of the MSI interrupt handling to prepare the support of upcoming 2020-10-12 11:40:41 -07:00
ipack
irqchip Merge branch 'irq/mstar' into irq/irqchip-next 2020-10-10 12:46:54 +01:00
isdn treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
leds LEDs changes for 5.9-rc1. 2020-08-05 19:24:27 -07:00
lightnvm treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
macintosh treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mailbox iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
mcb
md drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
media media: dvb-frontends/drxk_hard.c: fix uninitialized variable warning 2020-10-08 14:15:14 +02:00
memory treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
memstick Merge branch 'fixes' into next 2020-09-28 12:17:36 +02:00
message treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mfd - Bug Fixes 2020-08-28 10:15:33 -07:00
misc Initial support for sharing virtual addresses between the CPU and 2020-10-12 10:40:34 -07:00
mmc block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
most drivers: most: add USB adapter driver 2020-07-31 14:38:12 +02:00
mtd block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
mux treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
net Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-10-13 08:50:16 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
ntb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nubus
nvdimm mm/memremap_pages: support multiple ranges per invocation 2020-10-13 18:38:28 -07:00
nvme drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
nvmem nvmem: qcom-spmi-sdam: Enable multiple devices 2020-07-29 17:12:09 +02:00
of of: address: Work around missing device_type property in pcie nodes 2020-08-19 16:30:57 -06:00
opp Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-09-01 19:44:20 +02:00
oprofile module: Fix up module_notifier return values 2020-09-01 09:58:03 +02:00
parisc Merge branch 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2020-08-12 12:41:15 -07:00
parport treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pci mm/memremap_pages: support multiple ranges per invocation 2020-10-13 18:38:28 -07:00
pcmcia treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
perf perf: arm-cmn: Fix conversion specifiers for node type 2020-10-01 22:30:07 +01:00
phy phy: Second round of fixes for 5.9 2020-09-29 17:21:54 +02:00
pinctrl GPIO bulk changes for the v5.10 kernel cycle: 2020-10-13 10:09:33 -07:00
platform platform-drivers-x86 for v5.9-3 2020-10-06 12:00:52 -07:00
pnp
power Power Supply Fixes for 5.9 cycle 2020-10-09 11:38:07 -07:00
powercap powercap: RAPL: Add support for Lakefield 2020-09-16 14:16:04 +02:00
pps
ps3 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ptp ptp: ptp_clockmatrix: use i2c_master_send for i2c write 2020-08-19 16:23:22 -07:00
pwm pwm: Changes for v5.9-rc1 2020-08-14 16:00:09 -07:00
rapidio rapidio: Replace 'select' DMAENGINES 'with depends on' 2020-09-05 19:52:54 +03:00
ras RAS/CEC: Convert to DEFINE_SHOW_ATTRIBUTE() 2020-09-25 19:05:31 +02:00
regulator Merge remote-tracking branch 'regulator/for-5.10' into regulator-next 2020-10-05 16:54:56 +01:00
remoteproc remoteproc: scp: add COMPILE_TEST dependency 2020-09-26 09:40:05 +02:00
reset treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rpmsg treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rtc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
s390 block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
sbus
scsi drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
sfi
sh iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
siox
slimbus
soc soc/tegra: pmc: Don't create fake interrupt hierarchy levels 2020-10-10 12:12:11 +01:00
soundwire soundwire: fix double free of dangling pointer 2020-09-03 14:10:19 +05:30
spi spi: Fix for v5.9 2020-10-09 18:05:12 -07:00
spmi
ssb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
staging media updates for v5.10-rc1 2020-10-13 09:37:02 -07:00
target block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
tc
tee
thermal - Fix bogus thermal shutdowns for omap4430 where bogus values 2020-09-04 12:49:03 -07:00
thunderbolt thunderbolt: Fix for v5.9-rc6 2020-09-15 13:52:14 +02:00
tty serial: 8250_pci: Add Realtek 816a and 816b 2020-09-16 13:23:33 +02:00
uio
usb usbcore/driver: Accommodate usbip 2020-09-25 16:53:02 +02:00
vdpa vdpa/mlx5: Fix dependency on MLX5_CORE 2020-10-08 16:02:00 -04:00
vfio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
vhost vhost-vdpa: fix page pinning leakage in error path 2020-10-04 03:47:02 -04:00
video drm-misc-fixes for v5.9: 2020-10-06 12:38:28 +10:00
virt
virtio virtio-mem: don't special-case ZONE_MOVABLE 2020-10-13 18:38:33 -07:00
visorbus
vlynq
vme
w1
watchdog treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xen mm/memremap_pages: support multiple ranges per invocation 2020-10-13 18:38:28 -07:00
zorro zorro: Fix address space collision message with RAM expansion boards 2020-08-26 13:26:52 +02:00
Kconfig
Makefile