From patchwork Fri Jul 16 06:41:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 12381505 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=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 F1E7DC07E95 for ; Fri, 16 Jul 2021 06:41:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8F33D613EB for ; Fri, 16 Jul 2021 06:41:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F33D613EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C108B8D00F4; Fri, 16 Jul 2021 02:41:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BE68F8D00EC; Fri, 16 Jul 2021 02:41:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AAEBA8D00F4; Fri, 16 Jul 2021 02:41:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id 87BC68D00EC for ; Fri, 16 Jul 2021 02:41:32 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5A69C250A0 for ; Fri, 16 Jul 2021 06:41:31 +0000 (UTC) X-FDA: 78367504782.01.B9DA5D2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf23.hostedemail.com (Postfix) with ESMTP id 0BB159000716 for ; Fri, 16 Jul 2021 06:41:30 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id AB047613D0; Fri, 16 Jul 2021 06:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626417690; bh=1m5fIVQ+uzhPSG8PcXdPuiaqf6mOXHckGOgF9HakSdU=; h=From:To:Cc:Subject:Date:From; b=O0nSboG6Uvy0kvQyUWGTnI+y+0XZJJrGEjIMXwizY7m1Vy9QZBJPnl6J7o+Dgr8pk mi1nuBfwWYMXaeOC0vnChZJFKyFuma6w2eh0cuOLx/j96ndAb6wVohKDv++XGTeZlm RzVdutZzrB+PayvGnX/bwcHC6AJ6uxA/8VXBlCJIW66tz4jThEkwk56awoPTGE/BD4 q+SWWwV5hFhMBYk2zBXZQdkfW5DSbbq7HkPQkdzLmFqkbyqopc6vezAk67aqNW69vI 8Wn1Ax3kNtgj5oLDp/s+3h66X+6DXRh5HKs+wKHcTa53uUw5JypmWFY1d+PIOYcUlB tWVoiq/xKMp/w== From: Mike Rapoport To: Andrew Morton Cc: Mike Rapoport , Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm/page_alloc: make alloc_node_mem_map() __init rather than __ref Date: Fri, 16 Jul 2021 09:41:24 +0300 Message-Id: <20210716064124.31865-1-rppt@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 0BB159000716 X-Stat-Signature: gdxpb75amncdjt3nnnd9r8xcwkyfm3cx Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=O0nSboG6; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-HE-Tag: 1626417690-297485 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: From: Mike Rapoport alloc_node_mem_map() is never only called from free_area_init_node() that is an __init function. Make the actual alloc_node_mem_map() also __init and its stub version static inline. Signed-off-by: Mike Rapoport --- mm/page_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index b82e55006894..246a4f40ec41 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7497,7 +7497,7 @@ static void __init free_area_init_core(struct pglist_data *pgdat) } #ifdef CONFIG_FLATMEM -static void __ref alloc_node_mem_map(struct pglist_data *pgdat) +static void __init alloc_node_mem_map(struct pglist_data *pgdat) { unsigned long __maybe_unused start = 0; unsigned long __maybe_unused offset = 0; @@ -7543,7 +7543,7 @@ static void __ref alloc_node_mem_map(struct pglist_data *pgdat) #endif } #else -static void __ref alloc_node_mem_map(struct pglist_data *pgdat) { } +static inline void alloc_node_mem_map(struct pglist_data *pgdat) { } #endif /* CONFIG_FLATMEM */ #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT