From patchwork Fri Oct 5 16:16:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 10628419 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 D6804933 for ; Fri, 5 Oct 2018 16:16:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE7A529A11 for ; Fri, 5 Oct 2018 16:16:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B23FC29A22; Fri, 5 Oct 2018 16:16:56 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A95B29A11 for ; Fri, 5 Oct 2018 16:16:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 122B86B000A; Fri, 5 Oct 2018 12:16:51 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 001266B000C; Fri, 5 Oct 2018 12:16:50 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E0BA26B0010; Fri, 5 Oct 2018 12:16:50 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) by kanga.kvack.org (Postfix) with ESMTP id AF9866B000A for ; Fri, 5 Oct 2018 12:16:50 -0400 (EDT) Received: by mail-io1-f71.google.com with SMTP id f9-v6so12232486iok.23 for ; Fri, 05 Oct 2018 09:16:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :date:message-id:in-reply-to:references:mime-version :content-transfer-encoding:subject; bh=NTcJ226Q2+0NWWI9l8S5fVLhXXyyUbvC1ipsiSvc4qQ=; b=KWIMgwlZZWJZ0CuEiqEqODjOB5XA6TFcrmABY3acgxuWB+dufFXSl3ZESYxanyXvPI KOCusDSZKAEoe8gjuC1LX9fejHkAzUjLCvvfq1TY39M4LB0o/S6qzM1rw2UCyENeRPEx oT28QJR/HSTOj1NwKWwJbxbEV9fmv67EDpUdLDiXASdO0gxD7h4tnbPZqk39BNXnc74U kq/hC6XNC+N4Cc6uDsdn68QFb/Ow/GA8GrDrwkHWa29BQcvxyzNkP9u/ou248MxI5PPi zLP2pF763fG0zJGvmeHiL/H9YgQBVHb0dVreWnOd8+Geu0O1n2zTGVv7jiAaBc4ySOf/ GreA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com X-Gm-Message-State: ABuFfojVrKLnMeoDdzplYsgR3vMRzz/SOiEqeaV9YWRnzQNjO3o34BqK 4+OfewR1ZGey+F0PALaOpXxGgquB+ncBDUHCPn+azGWI8mesKlzwKL//vIKsb7O/iyYCsU9L3Zi uqU/Aq0slJ+SL8lXPbngJ1WcqXw3oVByjH4rgrFCEwxd0DgAX/5xo87n7OLDA5O18fQ== X-Received: by 2002:a24:3306:: with SMTP id k6-v6mr9170637itk.79.1538756210446; Fri, 05 Oct 2018 09:16:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV61tx++slz9ST/sijpjcJW1oltruxBZTTN9wK2tjAb04ENb4qTmskD8uYtSreIWHYnRZheiH X-Received: by 2002:a24:3306:: with SMTP id k6-v6mr9170588itk.79.1538756209743; Fri, 05 Oct 2018 09:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538756209; cv=none; d=google.com; s=arc-20160816; b=iFEy0jAkTj5w+9Cr6SW4aPCIKPnYUpVfghOrNbU4xCRf9p27oytZnFo0fz4iGiOHFS 84HNGsU8xlk3Tj4mjzzY0AimVFOgsWOnf1IMe+h73Uk8jQm2SK03hiWrtzDn/SWOUQ/O TfDjzLAJLe1KzbzxwhpcJ0zERk3/Smezju0HnpSxihyo+WygRbSLl17Y48vIeics4s/K Trgb+bIaYf50DGe2pNxQGvgxgGWrudZ03mJe1CM8YF0hFWAylkAUwXMsRAZ9CyaYClLM XOiDOUJS/Ph6z5fPp4/sU651m02oCjwunPwm/xNgD6fcK+k3Uoq4ikhtq3HhTg2rgVcp 6DDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:cc:to:from; bh=NTcJ226Q2+0NWWI9l8S5fVLhXXyyUbvC1ipsiSvc4qQ=; b=nSVPkoBar6p6y477GOeAa2hXJYNrxDZhhfkt86s8PRECxironSACMOoXV4YzYz8d9X HJmxb+tno7dZublfqLYg4DEAWDNcpbavBC2XqJ8df4vgzBFTIEiG1Jx1kbuAPMrEHsSk Q5rvyppS9M1Xz7pbp66HkHdHFyXgwq/xarJajOEY8kIUK0iGfBfJ1vvrbaRqOPhm5QuN z/oqmvVinptJIeRDOWGcD2g1L/oxQdmaTNXY0t8tqGfNHOyjVghIPPMelvfxCOIv3FkN Z1mOBgmg7TYRJZ01CzCzqBEV1HanfQGqZ0fP67Hm6oZ8eFQ0libSDPvnFsLobXt7QZUx 2ypw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com Received: from ale.deltatee.com (ale.deltatee.com. [207.54.116.67]) by mx.google.com with ESMTPS id d128-v6si1953878ite.36.2018.10.05.09.16.49 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Oct 2018 09:16:49 -0700 (PDT) Received-SPF: pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) client-ip=207.54.116.67; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gunthorp@deltatee.com designates 207.54.116.67 as permitted sender) smtp.mailfrom=gunthorp@deltatee.com 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 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 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) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 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(); }