Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp309292pxa; Wed, 5 Aug 2020 01:30:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1FD7cGQUYGbvDfqe54S1A7crxp5GkDyEwYG4Ci8Fof6f51bKQDFeeZp7qoJ9XxQ9wgCYv X-Received: by 2002:a17:906:1cd4:: with SMTP id i20mr2060174ejh.480.1596616236435; Wed, 05 Aug 2020 01:30:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596616236; cv=none; d=google.com; s=arc-20160816; b=c2naM8L1Sis8Qwg3GYqogzIk5Dv4fIQ2m2Uqpy39j8OzmguSKcux0xlo7g6MIS5edV CtVU2gnsAOkCEkoST7gVwcKfPotaeiLTVkaAqSv7Ni1JovgcVYJJQcTm6QfDgDd85Fgx sEkc1LSPhhHrlogfXqLlHVPK91uFHYX0S9rx99fEs9N9EbykqLnUw47juQjI7RJAH5uG lk0gtsb219eQgn/x/94tC7QfDN8zhJtTP1eOUvgmVdC2y1FzfmUJJVQnBRV89aqjngWi OL9dSJGslZJo+E7IYPxyNQHIFWmgdaK48c/kpW5Q3+hVRj/6OswzRfXwgcepoVl+8S0E b6+A== 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=FvaMXP5a+m7YjPK069Q+H34K0fPtN+F8dCVJuIAUPpY=; b=XG2MGhdHaBv0aB1Ni1tI1dlw3KXBNg1aP3w3kZ/Uu3n8z7RWtodlY6zVuxzIQkST9i D/5Pb3Ag4k1o8IpNwDpG36LA/AA0xr6LiFbvRJsuJq/pMW7onXMQe017eJrFPfBUs5TI cMjzPj5cPyKwiIZ/Eg+AV9vD0j2hi3O77wg/yfsxjm3TTaHGSU6iDcGVtKYSKlH2/OYF dRTvmuTcFXC0YTFT66EAV5lQmSIElbX7XMpcczx9g72LPmB4s6ZMPgnT+EQO0iQdy2ts Tl9Po/9KmeTywL1YCf58m8Wwd6MyBtC9e/haO2Gce/yov7+c5NXYyuGkHiQU3hkCQHAl 0xOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UUTWGjMa; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i23si866205ejj.300.2020.08.05.01.30.13; Wed, 05 Aug 2020 01:30:36 -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=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UUTWGjMa; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727930AbgHEI3s (ORCPT + 99 others); Wed, 5 Aug 2020 04:29:48 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:34453 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726563AbgHEI3r (ORCPT ); Wed, 5 Aug 2020 04:29:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596616184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FvaMXP5a+m7YjPK069Q+H34K0fPtN+F8dCVJuIAUPpY=; b=UUTWGjMaC589yMqIkc0P3tcJrgvfrnzLO8GogIGJlXgVmu4mZ8riSGVZ80gJd910sZWZnH x/6LkzLnS3lm3aS9tSyXrJKXxfyikTxKoZ52heun1ooQqpuN/VBShPPPSyIpZ1aw8AoC7W o+e4SIr3MyXoeyUk2C1AfLQ7axybcPE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-459-Fs5bhd50MLqa0hbUoos07g-1; Wed, 05 Aug 2020 04:29:36 -0400 X-MC-Unique: Fs5bhd50MLqa0hbUoos07g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F02638064AB; Wed, 5 Aug 2020 08:29:30 +0000 (UTC) Received: from localhost (ovpn-12-71.pek2.redhat.com [10.72.12.71]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E2DCC10013D0; Wed, 5 Aug 2020 08:29:26 +0000 (UTC) Date: Wed, 5 Aug 2020 16:29:24 +0800 From: Baoquan He To: Mike Rapoport Cc: Andrew Morton , Andy Lutomirski , Benjamin Herrenschmidt , Borislav Petkov , Catalin Marinas , Christoph Hellwig , Dave Hansen , Emil Renner Berthing , Ingo Molnar , Hari Bathini , Marek Szyprowski , Max Filippov , Michael Ellerman , Michal Simek , Mike Rapoport , Palmer Dabbelt , Paul Mackerras , Paul Walmsley , Peter Zijlstra , Russell King , Stafford Horne , Thomas Gleixner , Will Deacon , Yoshinori Sato , clang-built-linux@googlegroups.com, iommu@lists.linux-foundation.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.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, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, x86@kernel.org Subject: Re: [PATCH v2 15/17] memblock: remove unused memblock_mem_size() Message-ID: <20200805082924.GV10792@MiWiFi-R3L-srv> References: <20200802163601.8189-1-rppt@kernel.org> <20200802163601.8189-16-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200802163601.8189-16-rppt@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/20 at 07:35pm, Mike Rapoport wrote: > From: Mike Rapoport > > The only user of memblock_mem_size() was x86 setup code, it is gone now and > memblock_mem_size() funciton can be removed. > > Signed-off-by: Mike Rapoport > --- > include/linux/memblock.h | 1 - > mm/memblock.c | 15 --------------- > 2 files changed, 16 deletions(-) > > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index d70c2835e913..ec2fd8f32a19 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -450,7 +450,6 @@ static inline bool memblock_bottom_up(void) > > phys_addr_t memblock_phys_mem_size(void); > phys_addr_t memblock_reserved_size(void); > -phys_addr_t memblock_mem_size(unsigned long limit_pfn); > phys_addr_t memblock_start_of_DRAM(void); > phys_addr_t memblock_end_of_DRAM(void); > void memblock_enforce_memory_limit(phys_addr_t memory_limit); > diff --git a/mm/memblock.c b/mm/memblock.c > index c1a4c8798973..48d614352b25 100644 > --- a/mm/memblock.c > +++ b/mm/memblock.c > @@ -1656,21 +1656,6 @@ phys_addr_t __init_memblock memblock_reserved_size(void) > return memblock.reserved.total_size; > } > > -phys_addr_t __init memblock_mem_size(unsigned long limit_pfn) > -{ > - unsigned long pages = 0; > - unsigned long start_pfn, end_pfn; > - int i; > - > - for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) { > - start_pfn = min_t(unsigned long, start_pfn, limit_pfn); > - end_pfn = min_t(unsigned long, end_pfn, limit_pfn); > - pages += end_pfn - start_pfn; > - } > - > - return PFN_PHYS(pages); > -} Reviewed-by: Baoquan He