From patchwork Sun Aug 2 16:35:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 11696705 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCC0A138C for ; Sun, 2 Aug 2020 16:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A4FEE20885 for ; Sun, 2 Aug 2020 16:39:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596386341; bh=/OapfRuI75SY/XdIQJESU3T6prS3l8+u9aaoW6/2fF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZV8Ri/ZwvaCx6x7NT50lmMKJ0xBrAwS0DRHEmKJZ8/9pviqOv009ijhTi8HQszp4e d8poMyhzQOucj0IWkMcAnjT6Xcsa8HJpXgb1XTqqKJhvXM8rGJdVMojm41WvEMNJat ZQBGZK9DP/FG0EYqxdvy+EbwDt7i0vqrB0jEqaug= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727838AbgHBQjB (ORCPT ); Sun, 2 Aug 2020 12:39:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:48976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725820AbgHBQjB (ORCPT ); Sun, 2 Aug 2020 12:39:01 -0400 Received: from aquarius.haifa.ibm.com (nesher1.haifa.il.ibm.com [195.110.40.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BF63120738; Sun, 2 Aug 2020 16:38:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596386340; bh=/OapfRuI75SY/XdIQJESU3T6prS3l8+u9aaoW6/2fF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U3pdMYelKFOYAPi4XqQuIPvi0oETEzFpuTA29Gb8dtkzX+ka0NaEUYH0C58LpdHB/ wG3l284DStkVX5uTLvsOI+c/bAeW0eVhwoTZFrdlFwTetpqjSk7bfexzerRwzS3cCG Cub8e8SRt2PAoFugs0sntHlR7cv3T4VybvnORg3k= From: Mike Rapoport To: Andrew Morton Cc: Andy Lutomirski , Baoquan He , 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 , 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: [PATCH v2 15/17] memblock: remove unused memblock_mem_size() Date: Sun, 2 Aug 2020 19:35:59 +0300 Message-Id: <20200802163601.8189-16-rppt@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200802163601.8189-1-rppt@kernel.org> References: <20200802163601.8189-1-rppt@kernel.org> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org 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 Reviewed-by: Baoquan He --- 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); -} - /* lowest address */ phys_addr_t __init_memblock memblock_start_of_DRAM(void) {