Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp644079imm; Fri, 5 Oct 2018 09:23:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV618TGnoDvu4sUhxj5csqgsIKjjI/+2g8cJfTAm4C0Fi14Q1702mLYPtwmUVDJVHPn8oK6/i X-Received: by 2002:a63:78cc:: with SMTP id t195-v6mr10879408pgc.329.1538756638495; Fri, 05 Oct 2018 09:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538756638; cv=none; d=google.com; s=arc-20160816; b=NTJP5vz4WmQoAEi5cTriMiJHFsDUMKK22satRcLAirrxMuoSPL1vmHuMRkuvn4Ac2J q04g3l9XvGpYVzhMdt1+MYrOvTyonTJm70JtxmJpRmlQkt95LetxDyreyIer0T6vR3En IJUkXHtLloQZRU8miw5YBRWwlBQyQDKVHQ5zLcUy/ElEG0s9Qi/HMjiVRVwXi5cTy/E1 TdpMWHUPoNqjejuUZOtElbgxyfdRGHzDAAIgymlQhY+rbskoaSc78Vtg/zhcpZG6t2zS D4U3APxmG7glS+HTLfuWip15Oz/lf9qlzWaNV20Lga2c41RzklC4tshDvv1cetliAC9z zHzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=NTcJ226Q2+0NWWI9l8S5fVLhXXyyUbvC1ipsiSvc4qQ=; b=bINkNAur+asmRixfqgZhUpx04MbYHlgSwSZZbznKBQk6hjT4H0WiO8BYHzcFfzto3j qFxNjo49GDGWtLWLI3/kMO2O9pkalVxLcrTwL9bygYwN79sTfmSY3FkulqQx4Nl6bPKR sEPYAEMy+X98IGDJKU+rnB+o5QNCyr9yLrly1PVV+Q6OOfpa8Y25tWmV06BRyNSiy+HM TffMPz2jwPlfcjB1mfI9IzrsL8rSJtvjOyzPebDPvTyPcpTPC2v0XbjNl11QbjmucgeM 0v/mAVWyIY+Y3uKFngNnOvaL8IJUUAynnMyl9xx22Qn87jpNamp70Lk+rl+QdDzmKqlS jPFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12-v6si6996029pgq.57.2018.10.05.09.23.43; Fri, 05 Oct 2018 09:23:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729654AbeJEXWY (ORCPT + 99 others); Fri, 5 Oct 2018 19:22:24 -0400 Received: from ale.deltatee.com ([207.54.116.67]:32884 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729728AbeJEXQM (ORCPT ); Fri, 5 Oct 2018 19:16:12 -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 1g8SmU-0008D5-8H; Fri, 05 Oct 2018 10:16:48 -0600 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1g8SmS-0000eg-8U; Fri, 05 Oct 2018 10:16:44 -0600 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org Cc: Stephen Bates , Palmer Dabbelt , Albert Ou , Christoph Hellwig , Logan Gunthorpe , Yoshinori Sato , Rich Felker , Dan Williams , Rob Herring Date: Fri, 5 Oct 2018 10:16:41 -0600 Message-Id: <20181005161642.2462-5-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181005161642.2462-1-logang@deltatee.com> References: <20181005161642.2462-1-logang@deltatee.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, sbates@raithlin.com, palmer@sifive.com, aou@eecs.berkeley.edu, hch@lst.de, logang@deltatee.com, ysato@users.sourceforge.jp, dalias@libc.org, dan.j.williams@intel.com, robh@kernel.org X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,MYRULES_NO_TEXT autolearn=ham autolearn_force=no version=3.4.1 Subject: [PATCH 4/5] 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cleanup the open coded for_each_memblock() loop that is equivalent to the new memblocks_present() helper. Signed-off-by: Logan Gunthorpe Cc: Yoshinori Sato Cc: Rich Felker Cc: Dan Williams Cc: Rob Herring --- arch/sh/mm/init.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 7713c084d040..f601f96408ee 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -235,12 +235,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(); } -- 2.19.0