From patchwork Tue Mar 19 18:09:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10860175 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD82413B5 for ; Tue, 19 Mar 2019 18:09:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5CD529107 for ; Tue, 19 Mar 2019 18:09:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99EF929263; Tue, 19 Mar 2019 18:09:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E127129107 for ; Tue, 19 Mar 2019 18:09:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727443AbfCSSJf (ORCPT ); Tue, 19 Mar 2019 14:09:35 -0400 Received: from ale.deltatee.com ([207.54.116.67]:58818 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727329AbfCSSJf (ORCPT ); Tue, 19 Mar 2019 14:09:35 -0400 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31]) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1h6JB7-0002qC-K2; Tue, 19 Mar 2019 12:09:34 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1h6JB6-00029T-Ib; Tue, 19 Mar 2019 12:09:32 -0600 From: Logan Gunthorpe To: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andrew Morton , Mike Rapoport , Michal Hocko , Logan Gunthorpe , Christoph Hellwig , Yoshinori Sato , Rich Felker Date: Tue, 19 Mar 2019 12:09:30 -0600 Message-Id: <20190319180930.8231-1-logang@deltatee.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, rppt@linux.ibm.com, mhocko@suse.com, logang@deltatee.com, hch@lst.de, ysato@users.sourceforge.jp, dalias@libc.org X-SA-Exim-Mail-From: gunthorp@deltatee.com Subject: [PATCH] sh: mm: make use of new memblocks_present() helper X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cleanup the open coded for_each_memblock() loop that is equivalent to the new memblocks_present() helper. Signed-off-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig Cc: Yoshinori Sato Cc: Rich Felker Reviewed-by: Mike Rapoport --- arch/sh/mm/init.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) This is just a resend -- 2.19.0 diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index a8e5c0e00fca..dc0ff41d602d 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -234,12 +234,7 @@ static void __init do_init_bootmem(void) plat_mem_setup(); - for_each_memblock(memory, reg) { - int nid = memblock_get_region_node(reg); - - memory_present(nid, memblock_region_memory_base_pfn(reg), - memblock_region_memory_end_pfn(reg)); - } + memblocks_present(); sparse_init(); }