Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1178408imu; Wed, 9 Jan 2019 13:07:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN7O57Ux2dbq4YSKV5ahSFJog27BTyjkT4idvkmIHIStHHztl7MlpqBOiC2fcCozyqlZhnz9 X-Received: by 2002:a63:441e:: with SMTP id r30mr4708586pga.128.1547068078366; Wed, 09 Jan 2019 13:07:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547068078; cv=none; d=google.com; s=arc-20160816; b=ix2Odi0bdOrwusSSULRXi6VktV4KY66GrZEq/4tFnLEoASsJien5w6UzosDrD0JocI 3ACDlCR3LxcQPSza3yCJaD1dk0snqrRZso+fIp8vjh0gh7ZuEoTWmmrXQJx/o27Bl5Xk VKFHai9/xfoulb+8T7Qw6FrZyIC47ZJQJRBOxZJJk7ccCQZAgtuoMjfUYM4Z30o9qaVp t9+sHcF2CKoaDM4qL7Gf9rscz3STPc5eUVpciW5FTZAYghE/DUfODinjh9umgbDV6pU5 FrZupSFUieOTcv7pJGE1lk50cdbcdpdbpUz2y0RO3vmugs/Oe0BQfQK7t88AcMP9Eyv6 +Oqg== 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=Sa0NhjY5E2ZMzFWAQcko9RQ3lv1SPp+sWeg3vNMxtMk=; b=VLcjz8Zz1oXeOvW++b3unVBECP9u+EoZqXFXWRIAcE2T+FrbUxCqFusb9ww+hH1nLE Av9mKCuE53J59W7X9f0PuU9OsRc29nAtmcAU9dpGGbfPqtpgUEKdrVSZcVvlx8zFXQuK U03hqCMhJkpp1CzwZ4VqLKPaFE4vfrY3hs7PghFqaDqePrU6ojo2UjT9tg3XL7o7JqPs 4eT4t08wwulr7n9plk+9JoElPCX05JYlzp9ShVP2klw2AL+7BkoWLlRcyBbGg/pMye98 vkDrG3Sqh+2M0IZkHy7JLtJTenDUhPdobDROsoXW1ghgj/hahIHo7fa9l88+Z3KyJazx b5YA== 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 p16si8125708pff.272.2019.01.09.13.07.43; Wed, 09 Jan 2019 13:07:58 -0800 (PST) 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 S1726899AbfAIUjW (ORCPT + 99 others); Wed, 9 Jan 2019 15:39:22 -0500 Received: from ale.deltatee.com ([207.54.116.67]:60396 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbfAIUjU (ORCPT ); Wed, 9 Jan 2019 15:39:20 -0500 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 1ghKdC-0005yh-7d; Wed, 09 Jan 2019 13:39:19 -0700 Received: from gunthorp by cgy1-donard.priv.deltatee.com with local (Exim 4.89) (envelope-from ) id 1ghKd9-00023z-Dx; Wed, 09 Jan 2019 13:39:15 -0700 From: Logan Gunthorpe To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Stephen Bates , Palmer Dabbelt , Christoph Hellwig , Logan Gunthorpe , Yoshinori Sato , Rich Felker , Dan Williams , Rob Herring Date: Wed, 9 Jan 2019 13:39:10 -0700 Message-Id: <20190109203911.7887-2-logang@deltatee.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20190109203911.7887-1-logang@deltatee.com> References: <20190109203911.7887-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-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, sbates@raithlin.com, palmer@sifive.com, 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.2 (2018-09-13) 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.2 Subject: [PATCH v4 1/2] 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 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(); } -- 2.19.0