Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp906335pxt; Fri, 6 Aug 2021 17:35:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyivPfR6qIIWJfWyp7N1lKNuJPP+COg+YbstENAliOoqwlShUXE5lGq+xR2aA9zeLpWd7gi X-Received: by 2002:a17:906:c006:: with SMTP id e6mr12342608ejz.510.1628296555185; Fri, 06 Aug 2021 17:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628296555; cv=none; d=google.com; s=arc-20160816; b=oHv3arqZMsWaIiu9yD/BDXgo0Lp/qc09Huib3WwqOUiY0A582pXQiJcn6M/oQamjb3 oIWV/7SNd5d2+bW2tvs/XFHYEP80Vh+0DVTsWzPHiXcbx19aEaFj1vRxzrHyzikgzUBA OZZQgw45P8iatGecyfxvFgNFEGxHpuKxf3LMzS+jzSRYc9ChWLEtaSpnJetexMlDCpxe ckSM3IDFDRvuH0/ByPkuGnKRn5VEO4AebEl/UMz//hSG/bBbO3aIvni+g1drGfaNGw8M LslVT1n+ETRnoTu1VAESB3xC/5W6uwJxHdOjHt9roPEN3EjEXS4ygnEBTXSzPU3zR57m TTHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xfbXveP9AZ7DrJeKTchC6sa0LBUUGNHkmnU6yLgUglA=; b=sj/iy768hRgw4l5iw7qGcMshDqZuGKgA3BhIcuZWTRja3VkturBRcgnao+purahC2a RPWdBkyXHg45X6I5/OnNvzXPpdOm7zyunn/yeTNThPbiBkRUo0xlDjt5UT6xS4Gm0mu2 bxXirEHKvJi2d40k6l6ENk2sPmutm2l6+mHvS6sIJjD99TiNdN+gAP68rUBZ8rsfrC83 lqCH5Bd8YU2Rm39Y4gA1tlwOA0cWAENZz0kmkDGRZgsR0ZN9DfvdEWCP6JkT/oBJPGDz G1AsLneVufsrGwNi7zkuUxBA0/SeJQb/zf/amFeVNE8Hsp/mJp1LA76xbdnJ1ITXzz0T 5k8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=S2TjmXhc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si9844182edp.290.2021.08.06.17.35.32; Fri, 06 Aug 2021 17:35:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=S2TjmXhc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbhHGAcg (ORCPT + 99 others); Fri, 6 Aug 2021 20:32:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbhHGAcf (ORCPT ); Fri, 6 Aug 2021 20:32:35 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AFA9C0613CF; Fri, 6 Aug 2021 17:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xfbXveP9AZ7DrJeKTchC6sa0LBUUGNHkmnU6yLgUglA=; b=S2TjmXhcln45cl7fMiNQjIyZ2 QcyEgHwUJIysGWiljwBb4Wif6C/eOS7p1ZICf4FaHW+XkYsAI7UPDKe+CfFnxtp+SWNXtRfAx3o3z TTlFGdBrwAdniov/4ou3trIksj7tnOOCHB9wf2wUBthID93an5PgVcnOpRplyrwhYp13IyCBHUxK+ XqGLZDT0YMtQXt5eKvENZHEgxuvPGdJC7oUmG1kSq/k0q2kks9ggOChscscUP3hDaDtEa1xhsN+hu 6fs83XPPlosF+YhqubvII+xdisMEijC/aPTjpW7RDcj/I701A+I1K6g0hMHwcBMWQ5snSF8OC2Fim VRYXMtFtA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:47034) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCAFa-0003UQ-8w; Sat, 07 Aug 2021 01:31:42 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1mCAFT-0007BF-2P; Sat, 07 Aug 2021 01:31:35 +0100 Date: Sat, 7 Aug 2021 01:31:35 +0100 From: "Russell King (Oracle)" To: Mike Rapoport Cc: Andrew Morton , Albert Ou , Andy Lutomirski , Borislav Petkov , Catalin Marinas , Christian Borntraeger , Dave Hansen , Frank Rowand , Greg Kroah-Hartman , "H. Peter Anvin" , Heiko Carstens , Ingo Molnar , "Kirill A. Shutemov" , Len Brown , Marc Zyngier , Mike Rapoport , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , "Rafael J. Wysocki" , Rob Herring , Thomas Bogendoerfer , Thomas Gleixner , Vasily Gorbik , Will Deacon , devicetree@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2] memblock: make memblock_find_in_range method private Message-ID: <20210807003134.GR22278@shell.armlinux.org.uk> References: <20210802063737.22733-1-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210802063737.22733-1-rppt@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 02, 2021 at 09:37:37AM +0300, Mike Rapoport wrote: > From: Mike Rapoport > > There are a lot of uses of memblock_find_in_range() along with > memblock_reserve() from the times memblock allocation APIs did not exist. > > memblock_find_in_range() is the very core of memblock allocations, so any > future changes to its internal behaviour would mandate updates of all the > users outside memblock. > > Replace the calls to memblock_find_in_range() with an equivalent calls to > memblock_phys_alloc() and memblock_phys_alloc_range() and make > memblock_find_in_range() private method of memblock. > > This simplifies the callers, ensures that (unlikely) errors in > memblock_reserve() are handled and improves maintainability of > memblock_find_in_range(). > > Signed-off-by: Mike Rapoport Acked-by: Russell King (Oracle) Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!