Re: [PATCH v2 12/17] arch, drivers: replace for_each_membock() with for_each_mem_range()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 02, 2020 at 07:35:56PM +0300, Mike Rapoport wrote:
> From: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> 
> 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.
> 
> Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>
> ---
>  arch/mips/cavium-octeon/dma-octeon.c     | 12 +++---
>  arch/mips/kernel/setup.c                 | 31 +++++++--------

Acked-by: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux