From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E54DC433E0 for ; Wed, 5 Aug 2020 11:03:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BBDE22CF7 for ; Wed, 5 Aug 2020 11:03:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gcckGFDV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BBDE22CF7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RLKR0DtAZafMJTPRpXv/IllqXhU+TcHh9A8GBearWwM=; b=gcckGFDVj0+kYUd4W2R1tfpQu fhnxqOQYNHmskYWpG0IrFiABJLQV7R+5jB9o9C4FtOCsbevVWKtL/p9HS0RMT0B53n3OlG5GFnktV eyaWD9DjOnuG0yYnAUHAR9v7BfFMgH6iKqccUypbJNj8eMj6Jz4aSBuNc9+JqYWZG5cW/Do+2zGv9 VGv3QPbSnKtJRHv7yzmieGxDTGlGEwIxTVc7g2mLoFkl0evaCeiraPCQg6lCVDiFRYfNTXOmM246N Wazx74VXMi2dusaGF48qZ+AjgnMOoD8NhQlaK2Nr1l2ouP7TlyBGd7cygSGy2Iy4ok/f2SAShSlJC kq48++sow==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3HBN-0004RC-VA; Wed, 05 Aug 2020 11:02:05 +0000 Received: from elvis.franken.de ([193.175.24.41]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3HB7-0004Gm-S1; Wed, 05 Aug 2020 11:01:51 +0000 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1k3HAl-0001HW-01; Wed, 05 Aug 2020 13:01:27 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 899DDC0C25; Wed, 5 Aug 2020 13:00:35 +0200 (CEST) Date: Wed, 5 Aug 2020 13:00:35 +0200 From: Thomas Bogendoerfer To: Mike Rapoport Subject: Re: [PATCH v2 12/17] arch, drivers: replace for_each_membock() with for_each_mem_range() Message-ID: <20200805110035.GB11658@alpha.franken.de> References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-13-rppt@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200802163601.8189-13-rppt@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200805_070150_258912_7CC0508F X-CRM114-Status: GOOD ( 16.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Gleixner , Emil Renner Berthing , linux-sh@vger.kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Dave Hansen , linux-mips@vger.kernel.org, Max Filippov , Paul Mackerras , sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, Will Deacon , Christoph Hellwig , Marek Szyprowski , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Baoquan He , Michael Ellerman , x86@kernel.org, Russell King , Mike Rapoport , clang-built-linux@googlegroups.com, Ingo Molnar , linux-arm-kernel@lists.infradead.org, Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, Borislav Petkov , Andy Lutomirski , Paul Walmsley , Stafford Horne , Hari Bathini , Michal Simek , Yoshinori Sato , linux-mm@kvack.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Palmer Dabbelt , Andrew Morton , linuxppc-dev@lists.ozlabs.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Aug 02, 2020 at 07:35:56PM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > 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 > --- > arch/mips/cavium-octeon/dma-octeon.c | 12 +++--- > arch/mips/kernel/setup.c | 31 +++++++-------- Acked-by: Thomas Bogendoerfer Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel