Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp123868pxb; Thu, 14 Jan 2021 01:24:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvw4h7MoRfH+ERC/01ly9C/NjoV8NDvK5sMfrBNLdHyHcVATajq0zcC0zIScRKunnKdggY X-Received: by 2002:a05:6402:45:: with SMTP id f5mr5021689edu.273.1610616250414; Thu, 14 Jan 2021 01:24:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610616250; cv=none; d=google.com; s=arc-20160816; b=QDnHFutG9+Qop92M/ueI6GAY+Oxv4hKHQCdWr+sQ7BRj2XnMGDHT+QBSN2sjIG4oTh gACg31oGOWSsXvElhlmG6YqBnkc4NCOPx1U+4CzaaDoN9Q/rAQ6qdgRb8En2vwam8suB RUcI2ohLsJMx5UyxDY3MxusGVqnKRfUWVmh1PCvCp/mjrgps7ff9g3zgPduo64HTQJxX KpZ5hzGA7cER/au4WhDqif5m6iwj/ooK6tDqyW6DMznbx9WJ70KcNJvYD40U0moErsfI 9krlKW+XR5P9mIrxsYi0rjqjX7B3GY0FcUL81gn52EK/0bqhi7S563EyyrjbfnkCBOcc lhnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:to:subject:dkim-signature; bh=v+P+ymbxz56cW25ly8svSOtyorypFtEzsoTghRSRpI0=; b=l5ek3UZ6WpWcItFintM036+1bzzQ3m06yXuLM1s/MVTbGe6dZLjAyP24gnJkgBUZy+ FphZcXuynfJB4LrIFWw9P83ouBtyep14xS2BHBpIIQAe7GGBNBZf7xufTTnDMVmPBCGS /LGN7TrTW170L5pCTFcZZoQUs73v1FCrctCcoLwS51mtI9sEMWh5x678zTdwUua9+Xhj j/3JXf85lh+Ayo10F7h1QhzMDJAOQmWNsC36un9k1K8fYtGZPMTep+5JayXB726W6Z9e jyKcXXihyMusw6DQmJnn4PaBabOPPibS2/oYarVQBnnxGs21zIoVDy65mS7bYlo7P8Me K0EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=G38lD5Na; 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 x15si1857120edl.289.2021.01.14.01.23.46; Thu, 14 Jan 2021 01:24:10 -0800 (PST) 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=G38lD5Na; 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 S1727566AbhANJWg (ORCPT + 99 others); Thu, 14 Jan 2021 04:22:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34444 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbhANJWg (ORCPT ); Thu, 14 Jan 2021 04:22:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610616069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v+P+ymbxz56cW25ly8svSOtyorypFtEzsoTghRSRpI0=; b=G38lD5Na6cWyhhzEwkKiCuY53iWNwMehrJWPrlJ+rbphb7UeG2pWkfw6ZKLnYl+V8nSwWh 2Uuapc8GGOVSRrVpEr9ruv6IU50gY1AWtv5NS3AtqHgF3MKSHMP8AFbytUGcZbz7ApmqRc vxJRcC2BdjTT6PAeOxm3javZp8x8E+o= 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-227-lYMpLajHM1uB9BTga1zBXQ-1; Thu, 14 Jan 2021 04:21:08 -0500 X-MC-Unique: lYMpLajHM1uB9BTga1zBXQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8BC0F1015C80; Thu, 14 Jan 2021 09:21:06 +0000 (UTC) Received: from [10.36.115.75] (ovpn-115-75.ams2.redhat.com [10.36.115.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1067860C47; Thu, 14 Jan 2021 09:21:04 +0000 (UTC) Subject: Re: [PATCH] mm: memblock: remove return value of memblock_free_all() To: Daeseok Youn , rppt@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: <20210114070817.GA2868715@AD01715016> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <726525ab-d30d-e58c-21ea-db9d6ad4ae6b@redhat.com> Date: Thu, 14 Jan 2021 10:21:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20210114070817.GA2868715@AD01715016> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14.01.21 08:08, Daeseok Youn wrote: > 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 > --- > 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) > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb