From patchwork Thu Jan 14 07:08:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daeseok Youn X-Patchwork-Id: 12018713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A69EC433E0 for ; Thu, 14 Jan 2021 07:08:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7D7322395C for ; Thu, 14 Jan 2021 07:08:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D7322395C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9C0368D00C0; Thu, 14 Jan 2021 02:08:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 970BE8D008E; Thu, 14 Jan 2021 02:08:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 85E758D00C0; Thu, 14 Jan 2021 02:08:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0175.hostedemail.com [216.40.44.175]) by kanga.kvack.org (Postfix) with ESMTP id 6DA708D008E for ; Thu, 14 Jan 2021 02:08:28 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 11055181AEF32 for ; Thu, 14 Jan 2021 07:08:28 +0000 (UTC) X-FDA: 77703502296.19.base93_56113eb27524 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id E6BA31ACC29 for ; Thu, 14 Jan 2021 07:08:27 +0000 (UTC) X-HE-Tag: base93_56113eb27524 X-Filterd-Recvd-Size: 4527 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Thu, 14 Jan 2021 07:08:27 +0000 (UTC) Received: by mail-pf1-f172.google.com with SMTP id h186so2830657pfe.0 for ; Wed, 13 Jan 2021 23:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=S9qA10US8vCCyMBqu6NxHUPr7KRXGMvBnqk5YeBK5uU=; b=S2i9xG0O5qTsxksVhtuBm9dz9WBe1wbZF91O8ZA5i4u3PK+iSjkg8QdiaR4xUo5vCU y7R+uZlw/cF9RkMVAQNHZ+JTP4wzsklKrpaCLGD9tXYRYfPn4DpZahcOmOK8Dir1Lh63 Adum+a4NlBCexoCl0EJ46aVRPGOOcyQnd7R5WrLivr+oCIP7mPhbFhAulMwG/MK3d0T1 YzCK5b9/PRCA+/8sZjNLEgmW7gAW2v3G2nIHcsFU0VDIJBD4JNMyCGl4EYA8Dp/UlYoI 6BmI8sUR6V0mBZAdwCY5co32fcLgAcxwA1Wfe5csfzM5WQrdUhvF5Bk1SCDlcExGhYeE wYtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=S9qA10US8vCCyMBqu6NxHUPr7KRXGMvBnqk5YeBK5uU=; b=kMfe/AVTdNMWQRmZazQE59AE/m9Xey8j9FrTXVjaeH7iSGyR8y/jgRAmkYH689z74k 17xi2Q21XtCgp3TLLadf4Y2Ponro4sNpFwed6AbZrU3JOUv2SS56noe1l0VDBF7JL6MI AycdaerN/Wtj1DV8u0Loi6QQ1Pq2sc8Nk6sp1g/ob6SrFMPuc11vq0CudNzE6VRvE0Sl csUGM7VZPLkR9Is/Z7euRsiBWOl2tNE9sY7gjWuw4aDBfkNCWraKVHvRwSy0z7RHxG9j 6opLZBc9L79RnBuLkQ2Ez21+U9KOeeVBqFyxN7hmHuR+2P01jUtLn3O+ULdA6ZUmeJH6 IngA== X-Gm-Message-State: AOAM5301wTK7L02aTtqkBe/1wbdcPEzapMeKTV7CPdVir++VCIE1INSf u1vZgVA/kSKVoXU3Aqo6si4= X-Google-Smtp-Source: ABdhPJwxDHyY9npG8eI2PkJ4ofN3B0BPll4vjsU5rS46O4tX4xQS9OMKqpS+PcAOnEe5ffQ471PwCA== X-Received: by 2002:a65:68cb:: with SMTP id k11mr6098855pgt.271.1610608105465; Wed, 13 Jan 2021 23:08:25 -0800 (PST) Received: from AD01715016 ([211.249.70.61]) by smtp.gmail.com with ESMTPSA id t8sm224291pjm.45.2021.01.13.23.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 23:08:24 -0800 (PST) Date: Thu, 14 Jan 2021 16:08:17 +0900 From: Daeseok Youn To: rppt@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] mm: memblock: remove return value of memblock_free_all() Message-ID: <20210114070817.GA2868715@AD01715016> MIME-Version: 1.0 Content-Disposition: inline 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: No one checks the return value of memblock_free_all(). Make the return value void. memblock_free_all() is used on mem_init() for each architecture, and the total count of freed pages will be added to _totalram_pages variable by calling totalram_pages_add(). so do not need to return total count of freed pages. Signed-off-by: Daeseok Youn Reviewed-by: David Hildenbrand --- include/linux/memblock.h | 2 +- mm/memblock.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 9c5cc95c7cee..076fda398dff 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -117,7 +117,7 @@ int memblock_mark_mirror(phys_addr_t base, phys_addr_t size); int memblock_mark_nomap(phys_addr_t base, phys_addr_t size); int memblock_clear_nomap(phys_addr_t base, phys_addr_t size); -unsigned long memblock_free_all(void); +void memblock_free_all(void); void reset_node_managed_pages(pg_data_t *pgdat); void reset_all_zones_managed_pages(void); void memblock_enforce_memory_reserved_overlap(void); diff --git a/mm/memblock.c b/mm/memblock.c index 40ca30bfa387..2a2b1fe4b659 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -2074,10 +2074,8 @@ void __init reset_all_zones_managed_pages(void) /** * memblock_free_all - release free pages to the buddy allocator - * - * Return: the number of pages actually released. */ -unsigned long __init memblock_free_all(void) +void __init memblock_free_all(void) { unsigned long pages; @@ -2086,8 +2084,6 @@ unsigned long __init memblock_free_all(void) pages = free_low_memory_core_early(); totalram_pages_add(pages); - - return pages; } #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_ARCH_KEEP_MEMBLOCK)